[Libreoffice-commits] core.git: sc/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 30 19:01:57 UTC 2021


 sc/source/ui/docshell/dbdocfun.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4677345e3695bac158bb04048b4d5c608ed764b4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jul 30 11:16:04 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 30 21:01:16 2021 +0200

    cid#1489568 Dereference null return value
    
    Change-Id: I1e200d119c1b12266e69c21c2b94e83c1943b84d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119703
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 3cdee27ffb1d..6c374e1b09a3 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -602,7 +602,8 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
             ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell);
             if (pTabViewShell && pTabViewShell->GetDocId() == pSomeViewForThisDoc->GetDocId())
             {
-                pTabViewShell->GetViewData().GetLOKHeightHelper(nTab)->invalidateByIndex(nStartRow);
+                if (ScPositionHelper* pPosHelper = pTabViewShell->GetViewData().GetLOKHeightHelper(nTab))
+                    pPosHelper->invalidateByIndex(nStartRow);
             }
             pViewShell = SfxViewShell::GetNext(*pViewShell);
         }


More information about the Libreoffice-commits mailing list