summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-25 12:16:28 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-25 12:16:28 +0100
commit0cde74f788a054fa2b65107a030dd463b8d11c7a (patch)
tree0f14ea55c6e87fa623fd27153eaa39ad80e5ba00
parentca7c519c6e95890deb047ea6137303b8ec55c491 (diff)
Make Window's inDispose map more precisely to mbInDtor.feature/vclptr
Change-Id: I545aa03d46b0673aafe73daa23047d2a4b6936dd
-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();
}