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

Norbert Thiebaud nthiebaud at gmail.com
Thu Feb 21 23:35:51 PST 2013


 basctl/source/basicide/basides1.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f0300c1ade9f336c68c8ad992d89443f48021283
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Feb 18 01:35:46 2013 -0600

    coverity#735664 coverity#736134 coverity#736135 Dereference Null
    
    Change-Id: I1a5c7d7bb2d60a43bb6197fc04a01d981a1396d1
    Reviewed-on: https://gerrit.libreoffice.org/2215
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
    Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 85da8ae..474e792 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -301,7 +301,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
 
             SetCurLib( aDocument, aLibName );
 
-            if ( rReq.GetSlot() == SID_BASICIDE_CREATEMACRO )
+            if ( pBasic && rReq.GetSlot() == SID_BASICIDE_CREATEMACRO )
             {
                 SbModule* pModule = pBasic->FindModule( rInfo.GetModule() );
                 if ( !pModule )
@@ -318,7 +318,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
                         pModule = (SbModule*) pBasic->GetModules()->Get(0);
                 }
                 DBG_ASSERT( pModule, "Kein Modul!" );
-                if ( !pModule->GetMethods()->Find( rInfo.GetMethod(), SbxCLASS_METHOD ) )
+                if ( pModule && !pModule->GetMethods()->Find( rInfo.GetMethod(), SbxCLASS_METHOD ) )
                     CreateMacro( pModule, rInfo.GetMethod() );
             }
             SfxViewFrame* pViewFrame = GetViewFrame();


More information about the Libreoffice-commits mailing list