diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-05-13 14:24:06 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-05-13 14:27:55 +0200 |
commit | 29eece847b948d25abde0b602f28378d74d567fb (patch) | |
tree | 64f9294971035283a725bef6b9c50b916af8c09c | |
parent | dcc3d214760b5c448d75f53f286a1e63c1914dc2 (diff) |
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.
-rw-r--r-- | oox/source/shape/ShapeContextHandler.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index 9737c450b..b962ca95a 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) |