diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-06-24 17:26:27 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-06-24 17:28:58 +0100 |
commit | 6a6d7766f49cc283be174aead9785f5a95287be4 (patch) | |
tree | 9d2c57c96a79457c1c4eadd31bdb1031d71a15ce /basctl | |
parent | 16ca97a0c24da47cd7b0d2e7f3170d547cb063d2 (diff) |
tdf#92258 - fix crash editing macro module name.
Change-Id: I8e0bbab7d7497ed7c136ddbfba73618834d5a204
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 1ac759b83e5a..7958911dbfef 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -118,9 +118,9 @@ public: virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE { OUString sModuleName; - if( mpShell && ( Event.Accessor >>= sModuleName ) ) + if( mpShell && ( Event.Accessor >>= sModuleName ) ) { - ModulWindow* pWin = mpShell->FindBasWin(mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, false, true); + VclPtr<ModulWindow> pWin = mpShell->FindBasWin(mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, false, true); if( pWin ) mpShell->RemoveWindow( pWin, true, true ); } @@ -798,6 +798,8 @@ void Shell::UpdateWindows() void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChangeCurWindow ) { + VclPtr<BaseWindow> pWindowTmp( pWindow_ ); + DBG_ASSERT( pWindow_, "Kann keinen NULL-Pointer loeschen!" ); sal_uLong nKey = GetWindowId( pWindow_ ); pTabBar->RemovePage( (sal_uInt16)nKey ); @@ -817,7 +819,7 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChange { if ( !( pWindow_->GetStatus() & BASWIN_INRESCHEDULE ) ) { - pWindow_->disposeOnce(); + pWindowTmp.disposeAndClear(); } else { |