summaryrefslogtreecommitdiff
path: root/vcl/source/window/event.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-07-14 12:51:04 +0100
committerJulien Nabet <serval2412@yahoo.fr>2015-07-16 08:21:45 +0000
commit9e2e8bb5e6c5a7df376f6ada90703f59c95f19d6 (patch)
tree270be77039d8fcceeb1043d266c6007ab15be614 /vcl/source/window/event.cxx
parentb3ade2609d3ddde225eddb10cbcb477729baba7c (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/17037 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'vcl/source/window/event.cxx')
-rw-r--r--vcl/source/window/event.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index ec6a9b6e6153..b73614102cb1 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 )