[Libreoffice-commits] core.git: basic/source
Caolán McNamara
caolanm at redhat.com
Tue May 24 18:10:14 UTC 2016
basic/source/basmgr/basmgr.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit fef6bb7af23c2db714713a3b277fd5c40fd5705c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue May 24 18:52:59 2016 +0100
Resolves: tdf#93474 crash on importing a macro library
its a SfxLibrary which is not a XLibraryContainer
(a SfxLibraryContainer is however)
I think the issue is simply an empty name making code go down the container
rather than library route.
Change-Id: Ib0245d402fe375ac26ab9f2b14fe708b2a34a7a7
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 6b3d70ea..089910c 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 ) )
{
More information about the Libreoffice-commits
mailing list