]> git.saurik.com Git - wxWidgets.git/commitdiff
remove the carbon event handlers just before calling DisposeControl to avoid callback...
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 22 Aug 2005 15:12:02 +0000 (15:12 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 22 Aug 2005 15:12:02 +0000 (15:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index a25e4b30e70c0a49e40cb96ec3485afd8d2fe06c..b43b781adad964eca014bb1cbddfa06310d349cc 100644 (file)
@@ -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() ;