diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-18 13:22:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-18 15:36:14 +0100 |
commit | b1f80f1e9d38f15a00051dc9e7e529d90b572ae4 (patch) | |
tree | d2742c6130727e185af4d00f3d4501b0c0ff91d7 /sd | |
parent | 2529a364d177c2b232917562d98c2bfcfe7da132 (diff) |
coverity#1226485 Dereference null return value
Change-Id: Ib875f26170b90416e2ab1c498d93fb727d9633ce
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 5 |
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(); } |