[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sw/source

Caolán McNamara caolanm at redhat.com
Sun Jun 18 13:05:59 UTC 2017


 sw/source/uibase/app/docst.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 32e8b6de30639f14ce47f83828a8f402e04f572a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri May 26 10:35:57 2017 +0100

    coverity#1409896 Dereference before null check
    
    should this be pShell instead of pSh ?
    
    Change-Id: Ie653dbbdee8cebc402c9ee9e78630353ba977921
    Reviewed-on: https://gerrit.libreoffice.org/38913
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 8193e0416964..147212a01181 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -275,10 +275,10 @@ void  SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
             case SID_STYLE_EDIT:
                 break;
             case SID_WATERMARK:
+                if (pSh)
                 {
                     SfxWatermarkItem aItem = pSh->GetWatermark();
-                    if( pSh )
-                        rSet.Put(aItem);
+                    rSet.Put(aItem);
                 }
                 break;
             default:


More information about the Libreoffice-commits mailing list