Kaydet (Commit) f7811b53 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Meeks

vclwidget: add some dispose() checking

to catch code that accidentally recursively calls dispose()

Change-Id: I647434c76cfbbf4df32c6cef15381ecfd8b4977d
üst 00f2787a
......@@ -355,6 +355,7 @@ public:
mbPaintDisabled:1,
mbAllResize:1,
mbInDtor:1,
mbInDispose:1,
mbExtTextInput:1,
mbInFocusHdl:1,
mbOverlapVisible:1,
......
......@@ -136,6 +136,12 @@ void Window::dispose()
if (!mpWindowImpl)
return;
// TODO: turn this assert on once we have switched to using VclPtr everywhere
//assert( !mpWindowImpl->mbInDispose && "vcl::Window - already in dispose()" );
if (mpWindowImpl->mbInDispose)
return;
mpWindowImpl->mbInDispose = true;
// remove Key and Mouse events issued by Application::PostKey/MouseEvent
Application::RemoveMouseAndKeyEvents( this );
......@@ -711,6 +717,7 @@ WindowImpl::WindowImpl( WindowType nType )
mbPaintDisabled = false; // true: Paint should not be executed
mbAllResize = false; // true: Also sent ResizeEvents with 0,0
mbInDtor = false; // true: We're still in Window-Dtor
mbInDispose = false; // true: We're still in Window::dispose()
mbExtTextInput = false; // true: ExtTextInput-Mode is active
mbInFocusHdl = false; // true: Within GetFocus-Handler
mbCreatedWithToolkit = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment