diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-19 16:38:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-19 22:01:44 +0200 |
commit | b0618c49abdf1fd76b1d5f45cadbde1ab9e7797f (patch) | |
tree | a05f7b9629202feddd5a0c252c9a36d9aa5e3744 /sw | |
parent | 43fba4906a5a6b9d3e6674df1c8101b1f141752b (diff) |
coverity#1437410 Dereference after null check
Change-Id: Icf67be4419d1eeb5ef92d709d6453e6651b15723
Reviewed-on: https://gerrit.libreoffice.org/56119
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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/core/docnode/ndtbl1.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 9b9c86d6d57c..f5ced41182e4 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -89,9 +89,11 @@ SwTableFormatCmp::SwTableFormatCmp( SwFrameFormat *pO, SwFrameFormat *pN, sal_In SwTableFormatCmp::~SwTableFormatCmp() { if (pOld) + { pOld->Remove(this); - if (!pOld->HasWriterListeners()) - delete pOld; + if (!pOld->HasWriterListeners()) + delete pOld; + } } // static |