From: Stefan Csomor Date: Mon, 22 Aug 2005 15:12:02 +0000 (+0000) Subject: remove the carbon event handlers just before calling DisposeControl to avoid callback... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/229f6270305a7ff539f81f201956a609cdb1f84f remove the carbon event handlers just before calling DisposeControl to avoid callbacks into zombie windows... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index a25e4b30e7..b43b781ada 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -763,6 +763,7 @@ wxWindowMac::~wxWindowMac() { // in case the callback might be called during destruction wxRemoveMacControlAssociation( this) ; + ::RemoveEventHandler( (EventHandlerRef ) m_macControlEventHandler ) ; // we currently are not using this hook // ::SetControlColorProc( *m_peer , NULL ) ; m_peer->Dispose() ;