cid#1509258 Dereference null return value

Change-Id: Iebe32d16b3a294e60cca59c49de3da4b1f142e01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138498
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx
index 70fafd8e..3b15989c 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -731,6 +731,8 @@ bool ScOutlineDocFunc::HideOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel
        bRecord = false;

    ScOutlineTable* pTable = rDoc.GetOutlineTable( nTab );
    if (!pTable)
        return false;
    ScOutlineArray& rArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray();
    ScOutlineEntry* pEntry = rArray.GetEntry( nLevel, nEntry );
    SCCOLROW nStart = pEntry->GetStart();