From: Václav Slavík Date: Fri, 29 Feb 2008 21:11:21 +0000 (+0000) Subject: fixed ~wxWindowBase to remove associated context help from wxHelpProvider -- otherwis... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d18d8bdaf458dd408d9a351a64c05b8b2ab8bf15?hp=6a8cbe1b9202ee5eb7a8bfa9b2ce66afeadfad6a fixed ~wxWindowBase to remove associated context help from wxHelpProvider -- otherwise wrong help text could be reused by other controls later git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 00c3b89341..a9e3999fcc 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -369,6 +369,14 @@ wxWindowBase::~wxWindowBase() #if wxUSE_ACCESSIBILITY delete m_accessible; #endif + +#if wxUSE_HELP + // NB: this has to be called unconditionally, because we don't know + // whether this window has associated help text or not + wxHelpProvider *helpProvider = wxHelpProvider::Get(); + if ( helpProvider ) + helpProvider->RemoveHelp(this); +#endif } void wxWindowBase::SendDestroyEvent()