summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-15 21:21:28 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-16 09:57:58 +0100
commitf1b0679287a13c184f45c43e51ea3fa4d8fd4c31 (patch)
tree83c6d87a646388e86855ab2ed427b31ed3ce9814 /sw
parent28852149cbd7df2e9f11243b3fe25ad09d8816bd (diff)
ofz#5347 Indirect-leak
Change-Id: I4eb18c7ee52b29de9fabb555ad59cd9051d376b2 Reviewed-on: https://gerrit.libreoffice.org/47922 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index eb3ff52f1a4c..6551a41bd73c 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2607,7 +2607,13 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
OSL_ENSURE(pRecord, "how did that happen?");
if (!pRecord)
+ {
+ // remove old object from the Z-Order list
+ m_xMSDffManager->RemoveFromShapeOrder(pObject);
+ // and delete the object
+ SdrObject::Free(pObject);
return nullptr;
+ }
const bool bLayoutInTableCell =
m_nInTable && IsObjectLayoutInTableCell( pRecord->nLayoutInTableCell );