summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-26 10:35:57 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-06-18 15:05:34 +0200
commit32e8b6de30639f14ce47f83828a8f402e04f572a (patch)
tree1fbe4bdf1383e0b02e5f580892571cc5ea3cffa1
parent721efbeb117962e9b0cd547b51ede4a6736042a6 (diff)
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@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/uibase/app/docst.cxx4
1 files changed, 2 insertions, 2 deletions
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: