From 0cde74f788a054fa2b65107a030dd463b8d11c7a Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Sat, 25 Apr 2015 12:16:28 +0100 Subject: Make Window's inDispose map more precisely to mbInDtor. Change-Id: I545aa03d46b0673aafe73daa23047d2a4b6936dd --- vcl/source/window/window.cxx | 8 +++++--- 1 file 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::Undelete( this ); disposeOnce(); } -- cgit