diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-26 10:35:57 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-26 12:23:19 +0100 |
commit | 6ee4b68ce5bd52b31713fc5213594e54b2412737 (patch) | |
tree | bede5ff888a918270ad1c175370bec6919fbeed8 | |
parent | ac2ea8ab2cda18b9fb01cb0f6a9d510f7d143e4d (diff) |
coverity#1409896 Dereference before null check
should this be pShell instead of pSh ?
Change-Id: Ie653dbbdee8cebc402c9ee9e78630353ba977921
-rw-r--r-- | sw/source/uibase/app/docst.cxx | 4 |
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: |