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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 2 10:05:05 UTC 2020


 sc/source/ui/navipi/content.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 0bea7b285819d18de9d58cb9e7cf90ffad18aea2
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Feb 29 20:16:19 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Mar 2 11:04:32 2020 +0100

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

diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index ff6fa69b0199..9f7bb3ef2696 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -364,11 +364,11 @@ IMPL_LINK_NOARG(ScContentTree, ContentDoubleClickHdl, weld::TreeView&, bool)
 
             case ScContentId::AREALINK:
             {
-                const ScAreaLink* pLink = GetLink( nChild );
-                if( pLink )
+                const ScAreaLink* pLink = GetLink(nChild);
+                ScDocument* pSrcDoc = GetSourceDocument();
+                if (pLink && pSrcDoc)
                 {
                     const ScRange& aRange = pLink->GetDestArea();
-                    ScDocument* pSrcDoc = GetSourceDocument();
                     OUString aRangeStr(aRange.Format(*pSrcDoc, ScRefFlags::RANGE_ABS_3D, pSrcDoc->GetAddressConvention()));
                     pParentWindow->SetCurrentCellStr( aRangeStr );
                 }


More information about the Libreoffice-commits mailing list