From 0bea7b285819d18de9d58cb9e7cf90ffad18aea2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 29 Feb 2020 20:16:19 +0000 Subject: cid#1459023 Dereference null return value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id99adac0a544b59b6ac8f6ac225df1f218ed8405 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89765 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sc/source/ui/navipi/content.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sc/source/ui') 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 ); } -- cgit