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

Caolán McNamara caolanm at redhat.com
Sat Jan 24 06:17:38 PST 2015


 sc/source/ui/app/scmod.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 65ff0a58630c33680f4375636e6af1870def2e9c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jan 24 14:15:07 2015 +0000

    coverity#265794 Dereference null return value
    
    Change-Id: Id0762974d12cd7bc7c2bb1ba64b3bf369418bedb

diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 588075e..fd8d866 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -771,12 +771,12 @@ void ScModule::RecentFunctionsChanged()
 
     //! notify all views
     SfxViewFrame* pViewFrm = SfxViewFrame::Current();
-    if ( pViewFrm && pViewFrm->HasChildWindow(nFuncListID) )
+    if (pViewFrm && pViewFrm->HasChildWindow(nFuncListID))
     {
-        ScFunctionChildWindow* pWnd = static_cast<ScFunctionChildWindow*>(pViewFrm->GetChildWindow( nFuncListID ));
-
+        ScFunctionChildWindow* pWnd = static_cast<ScFunctionChildWindow*>(pViewFrm->GetChildWindow(nFuncListID));
+        if (!pWnd)
+            return;
         ScFunctionDockWin* pFuncList = static_cast<ScFunctionDockWin*>(pWnd->GetWindow());
-
         pFuncList->InitLRUList();
     }
 }


More information about the Libreoffice-commits mailing list