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

Caolán McNamara caolanm at redhat.com
Mon Mar 19 15:59:38 UTC 2018


 sc/source/ui/unoobj/docuno.cxx |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit a80d9d61b8dc98dc188c45a3d5d966c6d0ac2b79
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 19 13:54:54 2018 +0000

    coverity#1430075 Dereference after null check
    
    Change-Id: Id4c9cc1463ba8b38a7b115d574fec8c9b1d55384
    Reviewed-on: https://gerrit.libreoffice.org/51556
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 6eeeef3c9684..88e1a43dd7b8 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -557,12 +557,14 @@ VclPtr<vcl::Window> ScModelObj::getDocWindow()
     ScViewData* pViewData = ScDocShell::GetViewData();
     VclPtr<vcl::Window> pWindow;
     if (pViewData)
+    {
         pWindow = pViewData->GetActiveWin();
 
-    LokChartHelper aChartHelper(pViewData->GetViewShell());
-    vcl::Window* pChartWindow = aChartHelper.GetWindow();
-    if (pChartWindow)
-        pWindow = pChartWindow;
+        LokChartHelper aChartHelper(pViewData->GetViewShell());
+        vcl::Window* pChartWindow = aChartHelper.GetWindow();
+        if (pChartWindow)
+            pWindow = pChartWindow;
+    }
 
     return pWindow;
 }


More information about the Libreoffice-commits mailing list