summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-26 10:35:57 +0100
committerAndras Timar <andras.timar@collabora.com>2017-06-06 14:05:08 +0200
commit48c9369f68560dd8865da40ecd9227dc2240e28d (patch)
treeeaa451a41e28ce9f4fa0550ee39c2e9a0c281f8a /sw
parentc325057e7ad89e3286bc54b04fb4221be868a69f (diff)
coverity#1409896 Dereference before null check
should this be pShell instead of pSh ? Change-Id: Ie653dbbdee8cebc402c9ee9e78630353ba977921 (cherry picked from commit 6ee4b68ce5bd52b31713fc5213594e54b2412737)
Diffstat (limited to 'sw')
-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 6eff974face6..faa2ac13d814 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)
rSet.InvalidateItem(nWhich);
break;
case SID_WATERMARK:
+ if (pSh)
{
SfxWatermarkItem aItem = pSh->GetWatermark();
- if( pSh )
- rSet.Put(aItem);
+ rSet.Put(aItem);
}
break;
default: