summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/vml/vmlshape.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 1ec5c243ed56..35ad93d04731 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -769,7 +769,8 @@ Reference< XShape > BezierShape::implConvertAndInsert( const Reference< XShapes
for ( unsigned int i = 0; i < aFlagLists.size(); i++ )
aBezierCoords.Flags[i] = ContainerHelper::vectorToSequence( aFlagLists[i] );
- if( aCoordLists.front().front().X == aCoordLists.back().back().X
+ if( !aCoordLists.front().empty() && !aCoordLists.back().empty()
+ && aCoordLists.front().front().X == aCoordLists.back().back().X
&& aCoordLists.front().front().Y == aCoordLists.back().back().Y )
{ // HACK: If the shape is in fact closed, which can be found out only when the path is known,
// force to closed bezier shape (otherwise e.g. fill won't work).