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:
Julian Smart
2002-02-11 13:27:41 +00:00
parent ca7497c2a2
commit 774b90fbb3

View File

@@ -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)
{