svx/source/fmcomp/fmgridcl.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
New commits: commit f6fc9dd338751f8d14ce66024238976fa7259fcc Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Oct 23 01:01:03 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Oct 23 09:25:22 2024 +0200 tdf#163486: PVS: Expression is always true V560 A part of conditional expression is always true: pItem. Change-Id: I4ae18820dc7ec3232bccb099e56dd0da2b4f59eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175456 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Jenkins diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 8e91cbb56a35..4ed389f68ac7 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -800,10 +800,9 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& rM std::unique_ptr<SfxBoolItem> pItem; SfxItemState eState = pCurrentFrame->GetBindings().QueryState(SID_FM_CTL_PROPERTIES, pItem); - if (eState >= SfxItemState::DEFAULT && pItem != nullptr) + if (eState >= SfxItemState::DEFAULT && pItem) { - bool bChecked = pItem && pItem->GetValue(); - rMenu.set_active(u"column"_ustr, bChecked); + rMenu.set_active(u"column"_ustr, pItem->GetValue()); } } }