Kaydet (Commit) 612bd172 authored tarafından Michael Meeks's avatar Michael Meeks Kaydeden (comit) Andras Timar

tdf#92258 - fix crash editing macro module name.

Change-Id: I8e0bbab7d7497ed7c136ddbfba73618834d5a204
üst de0981b0
...@@ -118,9 +118,9 @@ public: ...@@ -118,9 +118,9 @@ public:
virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE
{ {
OUString sModuleName; 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 ) if( pWin )
mpShell->RemoveWindow( pWin, true, true ); mpShell->RemoveWindow( pWin, true, true );
} }
...@@ -799,6 +799,8 @@ void Shell::UpdateWindows() ...@@ -799,6 +799,8 @@ void Shell::UpdateWindows()
void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChangeCurWindow ) void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChangeCurWindow )
{ {
VclPtr<BaseWindow> pWindowTmp( pWindow_ );
DBG_ASSERT( pWindow_, "Kann keinen NULL-Pointer loeschen!" ); DBG_ASSERT( pWindow_, "Kann keinen NULL-Pointer loeschen!" );
sal_uLong nKey = GetWindowId( pWindow_ ); sal_uLong nKey = GetWindowId( pWindow_ );
pTabBar->RemovePage( (sal_uInt16)nKey ); pTabBar->RemovePage( (sal_uInt16)nKey );
...@@ -818,7 +820,7 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChange ...@@ -818,7 +820,7 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChange
{ {
if ( !( pWindow_->GetStatus() & BASWIN_INRESCHEDULE ) ) if ( !( pWindow_->GetStatus() & BASWIN_INRESCHEDULE ) )
{ {
pWindow_->disposeOnce(); pWindowTmp.disposeAndClear();
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment