[Libreoffice-commits] core.git: sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Nov 2 19:04:24 UTC 2019
sw/source/uibase/shells/basesh.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 5bf7bedd45b0eaabec7dfd042a308304785ca0a4
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Nov 2 15:24:32 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Nov 2 20:03:10 2019 +0100
cid#1455216 Dereference before null check
Change-Id: I84752fcd154e2e9c344e3ad397f26c1a0d5184c2
Reviewed-on: https://gerrit.libreoffice.org/81941
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index e8600de55c43..67e8ecfd7b64 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2345,7 +2345,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
aBrushItem->SetGraphicPos(GPOS_NONE);
sal_uInt16 nSlotId = SID_BACKGROUND_COLOR ? SID_BACKGROUND_COLOR : SID_TABLE_CELL_BACKGROUND_COLOR;
- if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem))
+ if (pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem))
{
OUString sColor = static_cast<const SfxStringItem*>(pColorStringItem)->GetValue();
if (sColor == "transparent")
@@ -2364,7 +2364,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
GetView().GetViewFrame()->GetBindings().SetState(aNewColorItem);
}
}
- else if(pArgs)
+ else if (pArgs)
{
const SvxColorItem& rNewColorItem = static_cast<const SvxColorItem&>(pArgs->Get(nSlotId));
const Color& rNewColor = rNewColorItem.GetValue();
More information about the Libreoffice-commits
mailing list