summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-29 20:16:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-03-02 11:04:32 +0100
commit0bea7b285819d18de9d58cb9e7cf90ffad18aea2 (patch)
tree8c763c079310129d2583fc4b6d25b8ffb3fe76b2 /sc
parent7ae33e175007d04021f5e911e3f7f6cbd0966804 (diff)
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@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/navipi/content.cxx6
1 files changed, 3 insertions, 3 deletions
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 );
}