summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-14 12:12:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-14 15:02:42 +0100
commit696b3dc65ba7033385cf50ec1b28e415be113002 (patch)
tree5e7246bbaea3b570d14f898e61ac017a4680e6f5 /svx
parentd9bb7014947724b5cbda4aa8a0b824407b57b678 (diff)
coverity#736826 Dereference before null check
Change-Id: I155f952f5eda086e3d134b387514968f67de4910
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdcrtv.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 57a735a94d6d..ebad073b9dff 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -648,14 +648,12 @@ bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
// recognize creation of a new 3D object inside a 3D scene
bool bSceneIntoScene(false);
- if(pObjMerk
- && dynamic_cast<const E3dScene* >(pObjMerk) != nullptr
- && pCreatePV
- && pCreatePV->GetAktGroup()
- && dynamic_cast<const E3dScene* >(pCreatePV->GetAktGroup()) != nullptr)
+ E3dScene* pObjScene = dynamic_cast<E3dScene*>(pObjMerk);
+ E3dScene* pAktScene = pObjScene ? dynamic_cast<E3dScene*>(pCreatePV->GetAktGroup()) : nullptr;
+ if (pAktScene)
{
bool bDidInsert = static_cast<E3dView*>(this)->ImpCloneAll3DObjectsToDestScene(
- static_cast<E3dScene*>(pObjMerk), static_cast<E3dScene*>(pCreatePV->GetAktGroup()), Point(0, 0));
+ pObjScene, pAktScene, Point(0, 0));
if(bDidInsert)
{