summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/basmgr.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 6b3d70ea1015..089910cc2428 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -255,7 +255,8 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const container::Con
if( bLibContainer )
{
uno::Reference< script::XLibraryContainer > xScriptCont( Event.Source, uno::UNO_QUERY );
- insertLibraryImpl( xScriptCont, mpMgr, Event.Element, aName );
+ if (xScriptCont.is())
+ insertLibraryImpl(xScriptCont, mpMgr, Event.Element, aName);
StarBASIC* pLib = mpMgr->GetLib( aName );
if ( pLib )
{
@@ -274,8 +275,8 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const container::Con
SbModule* pMod = pLib->FindModule( aName );
if( !pMod )
{
- OUString aMod;
- Event.Element >>= aMod;
+ OUString aMod;
+ Event.Element >>= aMod;
uno::Reference< vba::XVBAModuleInfo > xVBAModuleInfo( Event.Source, uno::UNO_QUERY );
if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aName ) )
{