From 774b90fbb3a496c1dfabcb16f98ddfbde68045a6 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 11 Feb 2002 13:27:41 +0000 Subject: [PATCH] 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 --- src/x11/app.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/x11/app.cpp b/src/x11/app.cpp index b0cfa2c739..5e206eea7d 100644 --- a/src/x11/app.cpp +++ b/src/x11/app.cpp @@ -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) { -- 2.47.2