sc/source/ui/unoobj/docuno.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 8cdfc82557cf1256aaa3e1e8200d1b2ce9f16608
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun May 22 12:06:36 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun May 22 14:35:37 2022 +0200

    cid#1504534 Dereference before null check
    
    Change-Id: I7deb272cbf7105b78911acb4b17bc3f078913a2a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134726
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 822a0cf59b46..79e51e44f633 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -4015,8 +4015,8 @@ rtl::Reference<ScTableColumnObj> 
ScTableColumnsObj::GetObjectByIndex_Impl(sal_In
 rtl::Reference<ScTableColumnObj> ScTableColumnsObj::GetObjectByName_Impl(const 
OUString& aName) const
 {
     SCCOL nCol = 0;
-    if ( ::AlphaToCol( pDocShell->GetDocument(), nCol, aName) )
-        if ( pDocShell && nCol >= nStartCol && nCol <= nEndCol )
+    if (pDocShell && ::AlphaToCol(pDocShell->GetDocument(), nCol, aName))
+        if (nCol >= nStartCol && nCol <= nEndCol)
             return new ScTableColumnObj( pDocShell, nCol, nTab );
 
     return nullptr;
commit 66d7ed084a676ff7803a3c7672e80d9f7ca0e74e
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun May 22 12:05:15 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun May 22 14:35:25 2022 +0200

    cid#1504540 Dereference before null check
    
    Change-Id: Ia47b6dd5d1524bd377670815a342d0ee478f823e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134725
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 4645ec111d68..822a0cf59b46 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -4124,8 +4124,8 @@ sal_Bool SAL_CALL ScTableColumnsObj::hasByName( const 
OUString& aName )
 {
     SolarMutexGuard aGuard;
     SCCOL nCol = 0;
-    if ( ::AlphaToCol( pDocShell->GetDocument(), nCol, aName) )
-        if ( pDocShell && nCol >= nStartCol && nCol <= nEndCol )
+    if (pDocShell && ::AlphaToCol(pDocShell->GetDocument(), nCol, aName))
+        if (nCol >= nStartCol && nCol <= nEndCol)
             return true;
 
     return false;       // not found

Reply via email to