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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Oct 28 13:53:33 UTC 2020


 sw/source/uibase/shells/textfld.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5d07ba3c1e887993715425721ab165567ee5fdea
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Oct 28 09:26:01 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Oct 28 14:52:51 2020 +0100

    cid#1468665 Dereference after null check
    
    Change-Id: I43de6ea072ac5e462c109328ba614f308cd6f27d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104921
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index ff104e8544d7..9eaa2241e339 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -804,7 +804,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
                     rSet.InvalidateItem( FN_HIDE_NOTE );
                 }
                 // tdf#137568 do not offer comment formating, if no comments are present
-                if ( !pPostItMgr->HasNotes() )
+                if (!pPostItMgr || !pPostItMgr->HasNotes())
                     rSet.DisableItem( FN_FORMAT_ALL_NOTES );
             }
             break;


More information about the Libreoffice-commits mailing list