diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-07-14 12:51:04 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-06 12:56:24 +0200 |
commit | 7c50bdb284c8a89104744113e64bda0c534cff97 (patch) | |
tree | 28f32749fa6731af71eaac7c94028c33530549ab /vcl | |
parent | ce400bd25448403d3864a7c1cf6fb7d64f8fbb17 (diff) |
tdf#92706 - avoid dbaccess wizard crash.
Hold a VclPtr on the window, make reset cleaner, and don't crash
removing listeners from disposed windows.
Change-Id: I3efb71117fc45562d5c740578f5e33dabb2684fe
Reviewed-on: https://gerrit.libreoffice.org/17038
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/event.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 61c11ab20bdd..852cc0c56938 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -249,7 +249,8 @@ void Window::AddEventListener( const Link<>& rEventListener ) void Window::RemoveEventListener( const Link<>& rEventListener ) { - mpWindowImpl->maEventListeners.removeListener( rEventListener ); + if (mpWindowImpl) + mpWindowImpl->maEventListeners.removeListener( rEventListener ); } void Window::AddChildEventListener( const Link<>& rEventListener ) @@ -259,7 +260,8 @@ void Window::AddChildEventListener( const Link<>& rEventListener ) void Window::RemoveChildEventListener( const Link<>& rEventListener ) { - mpWindowImpl->maChildEventListeners.removeListener( rEventListener ); + if (mpWindowImpl) + mpWindowImpl->maChildEventListeners.removeListener( rEventListener ); } ImplSVEvent * Window::PostUserEvent( const Link<>& rLink, void* pCaller, bool bReferenceLink ) |