From bdec405ed5017c432ef4f1efeb2e78ccd37fdc7b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 15 Apr 2015 15:39:40 +0100 Subject: don't crash on export of ooo52825-1.doc to .docx Change-Id: I944f65c9bf1cf7cc39e674bab602dbf2d499317c --- oox/source/export/vmlexport.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- cgit v1.2.3