From 2308b4171c4d52f67e4ef8750d20c22dd8330f01 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 12 Mar 2014 10:08:43 +0000 Subject: coverity#704772 Dereference after null check Change-Id: Ic0c56aa9e6f19828df3e81266cc4740167012815 --- sd/source/ui/unoidl/unopage.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sd') 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); -- cgit