summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-02-16 10:35:12 +0100
committerMuthu Subramanian <sumuthu@suse.com>2012-02-16 16:02:07 +0530
commit0b6fd58c1910b98a11e2f2ee4818d4b239f5d56c (patch)
tree057bb7f30b239da769fc2bb2d7188f643bd85a6a /oox
parentd532c1d111f76a581af6d3d1ccbeca7940bdb840 (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. Signed-off-by: Muthu Subramanian <sumuthu@suse.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 16b9420edcf1..c5f877487c00 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,