summaryrefslogtreecommitdiff
path: root/vcl/source/window/event.cxx
diff options
context:
space:
mode:
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 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 )