diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-08-18 12:45:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-08-18 16:06:33 +0200 |
commit | 64c60a67930ebf9a1b19b4396c9fea3c4c973e62 (patch) | |
tree | 5f6f50a8041d722fcccc94ec94ce484482a426a5 /sc | |
parent | b95038cd6795eec03989c708c1d05a894043dbc8 (diff) |
cid#1509305 Dereference null return value
Change-Id: I17175b9ce05b784844e49aed53d85a55e33a0f45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138484
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/docshell/olinefun.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx index 76ea01eae3bc..70fafd8e1e2a 100644 --- a/sc/source/ui/docshell/olinefun.cxx +++ b/sc/source/ui/docshell/olinefun.cxx @@ -640,6 +640,9 @@ void ScOutlineDocFunc::ShowOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel bRecord = false; ScOutlineTable* pTable = rDoc.GetOutlineTable( nTab ); + if (!pTable) + return; + ScOutlineArray& rArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray(); ScOutlineEntry* pEntry = rArray.GetEntry( nLevel, nEntry ); SCCOLROW nStart = pEntry->GetStart(); |