[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Tue Jun 19 20:02:08 UTC 2018


 sw/source/core/docnode/ndtbl1.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit b0618c49abdf1fd76b1d5f45cadbde1ab9e7797f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jun 19 16:38:12 2018 +0100

    coverity#1437410 Dereference after null check
    
    Change-Id: Icf67be4419d1eeb5ef92d709d6453e6651b15723
    Reviewed-on: https://gerrit.libreoffice.org/56119
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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


More information about the Libreoffice-commits mailing list