Made sure events for defunct windows are no longer handled.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -293,8 +293,17 @@ void wxApp::ProcessXEvent(WXEvent* _event)
|
||||
// Find the first wxWindow that corresponds to this event window
|
||||
// TODO: may need to translate coordinates from actualWindow
|
||||
// to window, if the receiving window != wxWindow window
|
||||
while (window && !(win = wxGetWindowFromTable(window)))
|
||||
window = wxGetWindowParent(window);
|
||||
// while (window && !(win = wxGetWindowFromTable(window)))
|
||||
// window = wxGetWindowParent(window);
|
||||
|
||||
// Because we're receiving events after a window
|
||||
// has been destroyed, assume a 1:1 match between
|
||||
// Window and wxWindow, so if it's not in the table,
|
||||
// it must have been destroyed.
|
||||
|
||||
win = wxGetWindowFromTable(window);
|
||||
if (!win)
|
||||
return;
|
||||
|
||||
switch (event->type)
|
||||
{
|
||||
|
Reference in New Issue
Block a user