X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/42cfcc58ee5b307b3e7cf7f1ec676e41b409d3eb..bdf5c30deb87129df7fb8a1a782d2b20dba0a816:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index ef3428dcee..b1b75973f6 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3298,6 +3298,13 @@ bool wxWindowMSW::HandleKillFocus(WXHWND hwnd) } #endif + // Don't send the event when in the process of being deleted. This can + // only cause problems if the event handler tries to access the object. + if ( m_isBeingDeleted ) + { + return FALSE; + } + wxFocusEvent event(wxEVT_KILL_FOCUS, m_windowId); event.SetEventObject(this);