X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/31b9d29fd7e1092c2442550eb77cd8477d73c936..bf9ce2abdf465110ca83469c1b336b056ae8ec72:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index c40aa1d746..03e49a2a0c 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -379,6 +379,12 @@ wxWindowBase::~wxWindowBase() #endif } +bool wxWindowBase::IsBeingDeleted() const +{ + return m_isBeingDeleted || + (!IsTopLevel() && m_parent && m_parent->IsBeingDeleted()); +} + void wxWindowBase::SendDestroyEvent() { wxWindowDestroyEvent event; @@ -2741,8 +2747,8 @@ bool wxWindowBase::TryValidator(wxEvent& wxVALIDATOR_PARAM(event)) // is receiving the event if ( event.GetEventObject() == this ) { - wxValidator *validator = GetValidator(); - if ( validator && validator->ProcessEvent(event) ) + wxValidator * const validator = GetValidator(); + if ( validator && validator->ProcessEventHere(event) ) { return true; }