diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-12 10:08:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-12 11:02:14 +0000 |
commit | 2308b4171c4d52f67e4ef8750d20c22dd8330f01 (patch) | |
tree | 2dde6fb6640071152e6ed996edefef7b9032c120 /sd | |
parent | d60ecf4b1566e3c1d2ad060f798f283923492eae (diff) |
coverity#704772 Dereference after null check
Change-Id: Ic0c56aa9e6f19828df3e81266cc4740167012815
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 52e3ac793391..2c35b3b1375c 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -1347,7 +1347,10 @@ Reference< drawing::XShape > SdGenericDrawPage::_CreateShape( SdrObject *pObj ) DBG_ASSERT( GetPage(), "SdGenericDrawPage::_CreateShape(), can't create shape for disposed page!" ); DBG_ASSERT( pObj, "SdGenericDrawPage::_CreateShape(), invalid call with pObj == 0!" ); - if( GetPage() && pObj ) + if (!pObj) + return Reference< drawing::XShape >(); + + if (GetPage()) { PresObjKind eKind = GetPage()->GetPresObjKind(pObj); |