]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/utils.cpp
Applied wxGauge:Pulse() patch.
[wxWidgets.git] / src / mac / carbon / utils.cpp
index 240161a190021d24a0f5e01cf9a4e10f27aabcc2..3824110a77b07fca411faeb289d36b19204e9386 100644 (file)
@@ -826,6 +826,11 @@ void wxMacControl::Init()
 
 void wxMacControl::Dispose()
 {
+    wxASSERT_MSG( IsValidControlHandle(m_controlRef) , wxT("Invalid Control Handle (maybe already released) in Dispose") );
+
+    CFIndex count = CFGetRetainCount( m_controlRef ) ;
+    wxASSERT_MSG( count == 1 , wxT("Reference Count of native control was not 1 in Dispose") );
+
     ::DisposeControl( m_controlRef );
     m_controlRef = NULL;
 }