summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/shapecontext.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/drawingml/shapecontext.cxx')
-rw-r--r--oox/source/drawingml/shapecontext.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx
index decf063d9dd6..eae01bfe5a6c 100644
--- a/oox/source/drawingml/shapecontext.cxx
+++ b/oox/source/drawingml/shapecontext.cxx
@@ -54,12 +54,12 @@ ShapeContext::ShapeContext( ContextHandler2Helper const & rParent, ShapePtr cons
, mpMasterShapePtr( pMasterShapePtr )
, mpShapePtr( pShapePtr )
{
+ if( mpMasterShapePtr.get() && mpShapePtr.get() )
+ mpMasterShapePtr->addChild( mpShapePtr );
}
ShapeContext::~ShapeContext()
{
- if ( mpMasterShapePtr.get() && mpShapePtr.get() )
- mpMasterShapePtr->addChild( mpShapePtr );
}
ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )