sc/source/ui/miscdlgs/inscldlg.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 54404c2c20399a7349ad1abb9f37df3048c7aad1 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Apr 30 08:35:48 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Apr 30 12:16:38 2024 +0200 cid#1596697 Dereference after null check Change-Id: I93c9401144fbe5a83ee461ff3fe4334326f6f05b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166886 Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/ui/miscdlgs/inscldlg.cxx b/sc/source/ui/miscdlgs/inscldlg.cxx index bfbfc0462936..cc9d60472e5c 100644 --- a/sc/source/ui/miscdlgs/inscldlg.cxx +++ b/sc/source/ui/miscdlgs/inscldlg.cxx @@ -95,8 +95,9 @@ ScInsertCellDlg::ScInsertCellDlg(weld::Window* pParent, bool bDisallowCellMove) } // if some cells are selected, then disable the SpinButtons - m_xNumberOfCols->set_sensitive(bColCount && !pViewData->GetMarkData().IsMarked()); - m_xNumberOfRows->set_sensitive(bRowsCount && !pViewData->GetMarkData().IsMarked()); + const bool bMarked = pViewData && pViewData->GetMarkData().IsMarked(); + m_xNumberOfCols->set_sensitive(bColCount && !bMarked); + m_xNumberOfRows->set_sensitive(bRowsCount && !bMarked); } ScInsertCellDlg::~ScInsertCellDlg() {}