summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-02-18 01:35:46 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-02-22 07:35:31 +0000
commitf0300c1ade9f336c68c8ad992d89443f48021283 (patch)
tree8fafbc70dc26b163fee0bc1ce5991f542313b255 /basctl
parent3b5bbb3d3b38add89b03a8e5b05db3b482431865 (diff)
coverity#735664 coverity#736134 coverity#736135 Dereference Null
Change-Id: I1a5c7d7bb2d60a43bb6197fc04a01d981a1396d1 Reviewed-on: https://gerrit.libreoffice.org/2215 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/basides1.cxx4
1 files changed, 2 insertions, 2 deletions
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();