]> git.saurik.com Git - wxWidgets.git/commitdiff
fix crash introduced in last commit (the correct item variable was shadowed by anothe...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Apr 2007 20:31:15 +0000 (20:31 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Apr 2007 20:31:15 +0000 (20:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/toolbar.cpp

index 7f12f1cc6b282a244b41ccbc9e80f4d63b5fc96e..897527f997a00a947c1a252415ba6ae5a2355dc7 100644 (file)
@@ -1491,8 +1491,8 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
 
 #if wxMAC_USE_NATIVE_TOOLBAR
             {
-                wxASSERT( tool->GetControl() != NULL );
-                HIToolbarItemRef    item;
+                wxCHECK_MSG( tool->GetControl(), false, _T("control must be non-NULL") );
+
                 HIViewRef viewRef = (HIViewRef) tool->GetControl()->GetHandle() ;
                 // as this control now is part of both the wxToolBar children and the native toolbar, we have to increase the
                 // reference count to make sure we are not dealing with zombie controls after the native toolbar has released its views