[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sc/source

Caolán McNamara caolanm at redhat.com
Mon Aug 7 07:55:06 UTC 2017


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

New commits:
commit 2e191b82881a1bc06aee73de85452eaf867d1041
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 4 16:53:23 2017 +0100

    coverity#1416135 Dereference after null check
    
    and
    
    coverity#1416137 Dereference after null check
    
    since...
    
    commit 04461743d75f8cffb5906ab52d772089c44a7780
    Date:   Fri Jul 21 13:12:20 2017 +0530
    
        tdf#108887 : Move the code of ScDrawView::CheckOle()...
    
    maybe this check is simply reversed seeing as
    
    bool bCalcSourceRanges = pRanges && pDoc;
    
    and after this line pRanges and pDoc are unconditionally
    dereferenced
    
    Change-Id: Ie3ed3054d2f31ddbc70895a4e6997395ca7de8b5
    Reviewed-on: https://gerrit.libreoffice.org/40772
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Dennis Francis <dennis.francis at collabora.co.uk>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 30f384b5bd2d8ec7f50ad0c85c43611313044f8c)
    Reviewed-on: https://gerrit.libreoffice.org/40818

diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index cc7c59c621f0..ed192aaee1d6 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -245,7 +245,7 @@ void getOleSourceRanges(const SdrMarkList& rMarkList, bool& rAnyOle, bool& rOneO
         }
     }
 
-    if( bCalcSourceRanges )
+    if (!bCalcSourceRanges)
         return;
 
     // Compile all range representation strings into ranges.


More information about the Libreoffice-commits mailing list