Kaydet (Commit) dce1b34a authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1426874 bogus Dereference after null check

Change-Id: Icb3ad60a7ec314182e06af179d9d5c3a1f3babcb
üst 02b9ada3
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment