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

New commits:
commit b566a5f5cef881c858d14d434df2b82b6d07d687
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu May 26 12:15:51 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu May 26 18:27:31 2022 +0200

    cid#1504573 Dereference before null check
    
    since...
    
    commit 8b4b852a35149b1cfffc681cbb4f57d4c0b671b3
    Date:   Mon May 23 15:48:41 2022 +0200
    
        Advanced Diagram support: Isolated IDiagramHelper, selection 
visualization
    
    we've already derefed pObj so can drop that check
    
    Change-Id: I9bdab5c069405c0015f74e4621e7b37fbbed2dd8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135017
    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 020178be50ce..806216137a6d 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -270,7 +270,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet )      
// disable functions
             rSet.DisableItem( SID_FITCELLSIZE );
 
         // Support advanced DiagramHelper
-        if(!pObj || !pObj->isDiagram())
+        if (!pObj->isDiagram())
         {
             rSet.DisableItem( SID_REGENERATE_DIAGRAM );
             rSet.DisableItem( SID_EDIT_DIAGRAM );

Reply via email to