sc/source/ui/docshell/dbdocfun.cxx | 2 +- sc/source/ui/docshell/docfunc.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
New commits: commit 64b14cc6ab688abbea2f87bc25ba42159b5dc904 Author: Xisco Fauli <[email protected]> AuthorDate: Thu May 23 15:41:43 2024 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Thu May 23 20:27:24 2024 +0200 sc: warning C6011: Dereferencing NULL pointer Change-Id: Ib6535d167ec741ea0641208d01f01bee334c0e79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167992 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index ee59f36232ae..204854b09764 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -630,7 +630,7 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, while (pViewShell) { ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell); - if (pTabViewShell && pTabViewShell->GetDocId() == pSomeViewForThisDoc->GetDocId()) + if (pTabViewShell && pSomeViewForThisDoc && pTabViewShell->GetDocId() == pSomeViewForThisDoc->GetDocId()) { if (ScPositionHelper* pPosHelper = pTabViewShell->GetViewData().GetLOKHeightHelper(nTab)) pPosHelper->invalidateByIndex(nStartRow); diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index d47f6f0bde40..6e3e050b8366 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -180,7 +180,7 @@ bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, bool bPaint, bool bApi ) while (pViewShell) { ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell); - if (pTabViewShell && pTabViewShell->GetDocId() == pSomeViewForThisDoc->GetDocId()) + if (pTabViewShell && pSomeViewForThisDoc && pTabViewShell->GetDocId() == pSomeViewForThisDoc->GetDocId()) { if (ScPositionHelper* pPosHelper = pTabViewShell->GetViewData().GetLOKHeightHelper(nTab)) pPosHelper->invalidateByIndex(nStartRow);
