diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-07-17 20:37:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-07-18 09:38:18 +0200 |
commit | f1824e27511709614ea3c03209caee1c22e2ab10 (patch) | |
tree | 815ef8f0705908fffb71aeafbea2f673e6ac1a69 /svx/source/engine3d | |
parent | 784f93b3895fc7e85eec26c3fece12433b3a5ce4 (diff) |
cid#1448253 Use after free
Change-Id: I83f3ef82faafd31f5a1afca9c5ab3f4040c3552b
Reviewed-on: https://gerrit.libreoffice.org/75812
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/engine3d')
-rw-r--r-- | svx/source/engine3d/view3d.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index 42c6605f288a..c18557d71f33 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -1560,11 +1560,13 @@ void E3dView::BreakSingle3DObj(E3dObject* pObj) else { SdrAttrObj* pNewObj = pObj->GetBreakObj().release(); - if(pNewObj) + if (pNewObj) { - InsertObjectAtView(pNewObj, *GetSdrPageView(), SdrInsertFlags::DONTMARK); - pNewObj->SetChanged(); - pNewObj->BroadcastObjectChange(); + if (InsertObjectAtView(pNewObj, *GetSdrPageView(), SdrInsertFlags::DONTMARK)) + { + pNewObj->SetChanged(); + pNewObj->BroadcastObjectChange(); + } } } } |