summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 498c0c1d007c..5a162f2f4135 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1056,10 +1056,11 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create(
}
uno::Reference< drawing::XShape > xShape( xRet, uno::UNO_QUERY );
- if( xShape.is() )
+ SvxShape* pShape = xShape.is() ? SvxShape::getImplementation(xShape) : NULL;
+ if (pShape)
{
xRet.clear();
- new SdXShape( SvxShape::getImplementation( xShape ), (SdXImpressDocument*)this );
+ new SdXShape( pShape, (SdXImpressDocument*)this );
xRet = xShape;
xShape.clear();
}