sc/source/ui/docshell/olinefun.cxx |    2 ++
 sw/source/core/unocore/unotbl.cxx  |    6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit b72ebcf5b26ab2e54c5251c5c45e6d45cade9236
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Aug 18 12:51:46 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Aug 18 20:30:10 2022 +0200

    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 <caol...@redhat.com>

diff --git a/sc/source/ui/docshell/olinefun.cxx 
b/sc/source/ui/docshell/olinefun.cxx
index 70fafd8e1e2a..3b15989c3664 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();
commit 3996ced5fbc75ed6a528969e29642eb60b7b6be5
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Aug 18 12:49:49 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Aug 18 20:29:56 2022 +0200

    cid#1509291 Unchecked dynamic_cast
    
    Change-Id: I1289113a9ba65a671ba79bca1eca4cf9ecbbb10f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138497
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/core/unocore/unotbl.cxx 
b/sw/source/core/unocore/unotbl.cxx
index 3349b54ed361..668c52065892 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -3522,9 +3522,9 @@ uno::Any SAL_CALL SwXCellRange::getPropertyValue(const 
OUString& rPropertyName)
                             RES_UNKNOWNATR_CONTAINER>
                     aSet(m_pImpl->m_pTableCursor->GetDoc().GetAttrPool());
                 // first look at the attributes of the cursor
-                SwUnoTableCursor *const pCursor =
-                    
dynamic_cast<SwUnoTableCursor*>(&(*m_pImpl->m_pTableCursor));
-                SwUnoCursorHelper::GetCursorAttr(pCursor->GetSelRing(), aSet);
+                SwUnoTableCursor& rCursor =
+                    dynamic_cast<SwUnoTableCursor&>(*m_pImpl->m_pTableCursor);
+                SwUnoCursorHelper::GetCursorAttr(rCursor.GetSelRing(), aSet);
                 m_pImpl->m_pPropSet->getPropertyValue(*pEntry, aSet, aRet);
             }
         }

Reply via email to