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

New commits:
commit 7c265a8b42aea2da28583863015ee73a58cd175c
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Aug 22 10:20:47 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Aug 22 16:12:59 2022 +0200

    cid#1509220 Explicit null dereferenced
    
    Change-Id: I5cc8958a5dd4f05fd8798eb561779027a868e386
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138679
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/uibase/shells/annotsh.cxx 
b/sw/source/uibase/shells/annotsh.cxx
index 3801f0489da7..26d3d7f67513 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -424,7 +424,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
             const SfxPoolItem* pItem = nullptr;
             if (pNewAttrs)
                 pNewAttrs->GetItemState(nSlot, false, &pItem );
-            if 
(pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
+            if (pItem && 
pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
                 pOLV->InsertText(static_cast<const SfxStringItem 
*>(pItem)->GetValue());
             break;
         }

Reply via email to