summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-15 15:39:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-04-15 15:40:14 +0100
commitbdec405ed5017c432ef4f1efeb2e78ccd37fdc7b (patch)
treec10272dd6e9bb37ea1ef2c7716c2332aae828e22 /oox
parent24d6c704a6a5fb9d0bfbea4156a8d95c27693544 (diff)
don't crash on export of ooo52825-1.doc to .docx
Change-Id: I944f65c9bf1cf7cc39e674bab602dbf2d499317c
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/vmlexport.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index d3e8291766e3..570416d7c28d 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -523,7 +523,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
// See EscherPropertyContainer::CreateCustomShapeProperties, by default nSeg is simply the number of points.
// FIXME: we miss out a significant amount of complexity from
// the above method here, and do some rather odd things to match.
- int nElems = aVertices.nPropSize / ( nPointSize * 2);
+ int nElems = !nPointSize ? 0 : aVertices.nPropSize / (nPointSize * 2);
if (nSeg > nElems)
{
SAL_WARN("oox", "Busted escher export " << nSeg << "vs . " << nElems << " truncating point stream");