Kaydet (Commit) f0300c1a authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

coverity#735664 coverity#736134 coverity#736135 Dereference Null

Change-Id: I1a5c7d7bb2d60a43bb6197fc04a01d981a1396d1
Reviewed-on: https://gerrit.libreoffice.org/2215Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
Tested-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst 3b5bbb3d
...@@ -301,7 +301,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) ...@@ -301,7 +301,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
SetCurLib( aDocument, aLibName ); SetCurLib( aDocument, aLibName );
if ( rReq.GetSlot() == SID_BASICIDE_CREATEMACRO ) if ( pBasic && rReq.GetSlot() == SID_BASICIDE_CREATEMACRO )
{ {
SbModule* pModule = pBasic->FindModule( rInfo.GetModule() ); SbModule* pModule = pBasic->FindModule( rInfo.GetModule() );
if ( !pModule ) if ( !pModule )
...@@ -318,7 +318,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) ...@@ -318,7 +318,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
pModule = (SbModule*) pBasic->GetModules()->Get(0); pModule = (SbModule*) pBasic->GetModules()->Get(0);
} }
DBG_ASSERT( pModule, "Kein Modul!" ); 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() ); CreateMacro( pModule, rInfo.GetMethod() );
} }
SfxViewFrame* pViewFrame = GetViewFrame(); SfxViewFrame* pViewFrame = GetViewFrame();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment