diff options
author | Thorsten Behrens <tbehrens@suse.com> | 2012-02-16 10:35:12 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2012-02-16 10:38:11 +0100 |
commit | 905df1bae9cab296ee7dd07e88813c667788ed8a (patch) | |
tree | 070019f7ef8b0883721bce479e7199d03eb902a3 /oox | |
parent | 6327c6d49b8bae52ac8cff1a4ef979bce582bfee (diff) |
Fix crash in smartart import
Rather check iterator validity *before* accessing it. valgrind
warning on linux, and crash on windows for e.g. doc at n#736495.
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 493dcf2c85d7..29a9cb9977df 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -394,8 +394,8 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const Diagram& rDgm, sal_uI { // find the data node to grab text from DiagramData::PointsNameMap::const_iterator aDataNode=rDgm.getData()->getPointsPresNameMap().find(msName); - if( aDataNode->second.size() > nIdx && - aDataNode != rDgm.getData()->getPointsPresNameMap().end() ) + if( aDataNode != rDgm.getData()->getPointsPresNameMap().end() && + aDataNode->second.size() > nIdx ) { OSL_TRACE( "Filling content from %d th layout node named \"%s\", modelId \"%s\"", nIdx, |