sc/source/ui/drawfunc/drawsh2.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6e29949de67a73782a137f341db5ade89ae99e50
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Aug 7 16:28:21 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sat Aug 7 21:08:34 2021 +0200

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

diff --git a/sc/source/ui/drawfunc/drawsh2.cxx 
b/sc/source/ui/drawfunc/drawsh2.cxx
index 6c0314493eea..cdcb9211450f 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -229,7 +229,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet )      
// disable functions
     else if ( nMarkCount == 1 )
     {
         SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
-        if ( !pObj || pObj->getHyperlink().isEmpty() )
+        if (pObj->getHyperlink().isEmpty())
         {
             rSet.DisableItem( SID_EDIT_HYPERLINK );
             rSet.DisableItem( SID_OPEN_HYPERLINK );

Reply via email to