Make Window's inDispose map more precisely to mbInDtor.
Change-Id: I545aa03d46b0673aafe73daa23047d2a4b6936dd
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index cb457e4c..a280209 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();
}