[Libreoffice-commits] .: Branch 'libreoffice-3-4' - oox/source

Lubos Lunak llunak at kemper.freedesktop.org
Fri May 13 05:28:20 PDT 2011


 oox/source/shape/ShapeContextHandler.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 29eece847b948d25abde0b602f28378d74d567fb
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Fri May 13 14:24:06 2011 +0200

    avoid deleting before a use (bnc#693200)
    
    The call to clearShapes() cleared the list and deleted items, which
    was what pShape was pointing to -> crash.
    ACK by Cedric.

diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index 9737c45..b962ca9 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -246,8 +246,8 @@ ShapeContextHandler::getShape() throw (uno::RuntimeException)
             mpDrawing->finalizeFragmentImport();
             if( const ::oox::vml::ShapeBase* pShape = mpDrawing->getShapes().getFirstShape() )
             {
-                mpDrawing->getShapes( ).clearShapes( );
                 xResult = pShape->convertAndInsert( xShapes );
+                mpDrawing->getShapes( ).clearShapes( );
             }
         }
         else if (mpShape.get() != NULL)


More information about the Libreoffice-commits mailing list