From f0300c1ade9f336c68c8ad992d89443f48021283 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Mon, 18 Feb 2013 01:35:46 -0600 Subject: coverity#735664 coverity#736134 coverity#736135 Dereference Null Change-Id: I1a5c7d7bb2d60a43bb6197fc04a01d981a1396d1 Reviewed-on: https://gerrit.libreoffice.org/2215 Reviewed-by: Norbert Thiebaud Tested-by: Norbert Thiebaud --- basctl/source/basicide/basides1.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 85da8aef485b..474e792eb5c5 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(); -- cgit