oox/source/drawingml/diagram/diagramlayoutatoms.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0b6fd58c1910b98a11e2f2ee4818d4b239f5d56c
Author: Thorsten Behrens <tbehr...@suse.com>
Date:   Thu Feb 16 10:35:12 2012 +0100

    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 <sumu...@suse.com>

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 16b9420..c5f8774 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,
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to