make sure we catch invalid control refs better
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9c3af83154
commit
8c981ec64d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user