summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/window/window.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index cb457e4cfa73..a2802096cc7c 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -139,9 +139,8 @@ bool Window::IsDisposed() const
void Window::dispose()
{
- mpWindowImpl->mbInDispose = true;
-
- assert( mpWindowImpl && mpWindowImpl->mbInDispose ); // should only be called from disposeOnce()
+ assert( mpWindowImpl );
+ assert( !mpWindowImpl->mbInDispose ); // should only be called from disposeOnce()
assert( !mpWindowImpl->mpParent ||
!mpWindowImpl->mpParent->IsDisposed() ||
"vcl::Window child should have its parent disposed first" );
@@ -159,6 +158,8 @@ void Window::dispose()
xCanvasComponent->dispose();
}
+ mpWindowImpl->mbInDispose = true;
+
CallEventListeners( VCLEVENT_OBJECT_DYING );
// do not send child events for frames that were registered as native frames
@@ -576,6 +577,7 @@ void Window::dispose()
Window::~Window()
{
+ // FIXME: we should kill all LazyDeletor usage.
vcl::LazyDeletor<vcl::Window>::Undelete( this );
disposeOnce();
}