fixes crashes with embedded controls in toolbars after toolbar destruction, code was moved in r62988, but apparently Destroy doesn't have to be called, so do a last check, fixes #14258
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f8ab0cdb3e
commit
71940de693
@ -932,6 +932,15 @@ wxToolBar::~wxToolBar()
|
|||||||
if ( !m_macToolbar )
|
if ( !m_macToolbar )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// it might already have been uninstalled due to a previous call to Destroy, but in case
|
||||||
|
// wasn't, do so now, otherwise redraw events may occur for deleted objects
|
||||||
|
bool ownToolbarInstalled = false;
|
||||||
|
MacTopLevelHasNativeToolbar( &ownToolbarInstalled );
|
||||||
|
if (ownToolbarInstalled)
|
||||||
|
{
|
||||||
|
MacUninstallNativeToolbar();
|
||||||
|
}
|
||||||
|
|
||||||
CFIndex count = CFGetRetainCount( m_macToolbar ) ;
|
CFIndex count = CFGetRetainCount( m_macToolbar ) ;
|
||||||
// Leopard seems to have one refcount more, so we cannot check reliably at the moment
|
// Leopard seems to have one refcount more, so we cannot check reliably at the moment
|
||||||
if ( UMAGetSystemVersion() < 0x1050 )
|
if ( UMAGetSystemVersion() < 0x1050 )
|
||||||
|
Loading…
Reference in New Issue
Block a user