summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-18 13:26:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-18 15:36:14 +0100
commitf9094a5eaa00e8b7e6ac44453a0f60feea595fb1 (patch)
treef33024bb1e879cb9208f8c0de42def67c1d9446f /sd
parentb1f80f1e9d38f15a00051dc9e7e529d90b572ae4 (diff)
coverity#1226487 Dereference null return value
Change-Id: Icbdf4f4b1739a63aa02260ddc3b29097cb157b63
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/unopage.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 39cc6eef9bd6..c0184896f2e8 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1469,8 +1469,12 @@ Reference< drawing::XShape > SdGenericDrawPage::_CreateShape(SdrObject *pObj) c
pShape->SetShapeType( aShapeType );
}
- // SdXShape aggregates SvxShape
- new SdXShape( SvxShape::getImplementation( xShape ), GetModel() );
+ SvxShape *pSdShape = SvxShape::getImplementation(xShape);
+ if (pSdShape)
+ {
+ // SdXShape aggregates SvxShape
+ new SdXShape(pSdShape, GetModel());
+ }
return xShape;
}
else