From d18d8bdaf458dd408d9a351a64c05b8b2ab8bf15 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 29 Feb 2008 21:11:21 +0000 Subject: [PATCH] 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 --- src/common/wincmn.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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() -- 2.50.0