Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git vcl/source/window/event.cxx vcl/source/window/event.cxx
- index 1f3eb24..65828f4 100644
- --- vcl/source/window/event.cxx
- +++ vcl/source/window/event.cxx
- @@ -205,13 +205,12 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData )
- {
- VclWindowEvent aEvent( this, nEvent, pData );
- - ImplDelData aDelData;
- - ImplAddDel( &aDelData );
- + VclPtr<vcl::Window> xWindow = this;
- Application::ImplCallEventListeners( aEvent );
- - if ( aDelData.IsDead() )
- - return;
- + if( xWindow->IsDisposed() )
- + return;
- if (!mpWindowImpl->maEventListeners.empty())
- {
- @@ -219,25 +218,26 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData )
- std::vector<Link<VclWindowEvent&,void>> aCopy( mpWindowImpl->maEventListeners );
- for ( Link<VclWindowEvent&,void>& rLink : aCopy )
- {
- - if (aDelData.IsDead()) break;
- + if( xWindow->IsDisposed() )break;
- // check this hasn't been removed in some re-enterancy scenario fdo#47368
- if( std::find(mpWindowImpl->maEventListeners.begin(), mpWindowImpl->maEventListeners.end(), rLink) != mpWindowImpl->maEventListeners.end() )
- rLink.Call( aEvent );
- }
- }
- - if ( aDelData.IsDead() )
- - return;
- + if( xWindow->IsDisposed() )
- + return;
- - ImplRemoveDel( &aDelData );
- + xWindow.clear();
- + xWindow.reset();
- vcl::Window* pWindow = this;
- while ( pWindow )
- {
- - pWindow->ImplAddDel( &aDelData );
- + xWindow = pWindow;
- - if ( aDelData.IsDead() )
- - return;
- + if( xWindow->IsDisposed() )
- + return;
- auto& rWindowImpl = *pWindow->mpWindowImpl;
- if (!rWindowImpl.maChildEventListeners.empty())
- @@ -256,18 +256,19 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData )
- );
- for ( Link<VclWindowEvent&,void>& rLink : aCopy )
- {
- - if (aDelData.IsDead())
- - return;
- + if( xWindow->IsDisposed() )
- + return;
- // Check this hasn't been removed in some re-enterancy scenario fdo#47368.
- if( rWindowImpl.maChildEventListenersDeleted.find(rLink) == rWindowImpl.maChildEventListenersDeleted.end() )
- rLink.Call( aEvent );
- }
- }
- - if ( aDelData.IsDead() )
- - return;
- + if( xWindow->IsDisposed() )
- + return;
- - pWindow->ImplRemoveDel( &aDelData );
- + xWindow.clear();
- + xWindow.reset();
- pWindow = pWindow->GetParent();
- }
Add Comment
Please, Sign In to add comment