diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-06-03 10:16:26 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-06-03 10:17:05 +0200 |
commit | f5d6e7af69f6b8972bd97d1d8e2a6d9ec5a6294a (patch) | |
tree | 18d2bc7fe48e09cb32883e19bfc64e24fc521734 /oox | |
parent | d209e133191853f12557d879d1dcda7a0309dac6 (diff) |
Fixing crash with dereferencing front() and back() of an empty vector
Change-Id: If7204614aa7a650f4a2804fc63dd3301ece2281e
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 3 |
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). |