[Libreoffice-commits] core.git: sc/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Jul 12 10:18:45 UTC 2020


 sc/source/ui/uitest/uiobject.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit e203f47774f27e5fc66dc8280643e1955c547eb6
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jul 11 19:50:33 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Jul 12 12:18:02 2020 +0200

    cid#1465252 Dereference null return value
    
    Change-Id: I8884218bb93a5684fb8f0754013fa00215bbc002
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98578
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/uitest/uiobject.cxx b/sc/source/ui/uitest/uiobject.cxx
index a00673b424ed..18609b38af10 100644
--- a/sc/source/ui/uitest/uiobject.cxx
+++ b/sc/source/ui/uitest/uiobject.cxx
@@ -83,7 +83,9 @@ StringMap ScGridWinUIObject::get_state()
     ScAddress aPos( mxGridWindow->getViewData()->GetCurX() , mxGridWindow->getViewData()->GetCurY() , mxGridWindow->getViewData()->GetTabNo() );
     if ( pDoc->HasNote( aPos ) )
     {
-        aMap["CurrentCellCommentText"] = pDoc->GetNote( aPos )->GetText();
+        ScPostIt* pNote = pDoc->GetNote(aPos);
+        assert(pNote);
+        aMap["CurrentCellCommentText"] = pNote->GetText();
     }
 
     ScAppOptions aOpt = SC_MOD()->GetAppOptions();


More information about the Libreoffice-commits mailing list