sw/source/uibase/shells/basesh.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 5bf7bedd45b0eaabec7dfd042a308304785ca0a4 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Nov 2 15:24:32 2019 +0000 Commit: Caolán McNamara <caol...@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 <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits