summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-22 09:48:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-12-22 10:07:01 +0000
commitdce1b34a62ad204f995f626064ccf6b71e59c9f5 (patch)
treef85da76e1a027871c552c19899be5c74160c9516 /sw
parent02b9ada327c862ce79b5d4e4bbd4370d615b0e0f (diff)
coverity#1426874 bogus Dereference after null check
Change-Id: Icb3ad60a7ec314182e06af179d9d5c3a1f3babcb
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/shells/basesh.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 173c8d69d372..7428455dfb7b 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2260,7 +2260,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
const SfxItemSet* pArgs = rReq.GetArgs();
sal_uInt16 nSlot(rReq.GetSlot());
- if(!pArgs && nSlot != SID_BACKGROUND_COLOR)
+ if (!pArgs && nSlot != SID_BACKGROUND_COLOR)
{
return;
}
@@ -2314,6 +2314,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
case SID_ATTR_BRUSH:
case RES_BACKGROUND:
{
+ assert(pArgs && "only SID_BACKGROUND_COLOR can have !pArgs, checked at entry");
const SvxBrushItem& rNewBrushItem = static_cast<const SvxBrushItem&>(pArgs->Get(GetPool().GetWhich(nSlot)));
aBrushItem = rNewBrushItem;
break;