From d5c87edd820aea078e88e4f6b45c6a122cbaaed6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Apr 2007 20:31:15 +0000 Subject: [PATCH] fix crash introduced in last commit (the correct item variable was shadowed by another one and so remained NULL) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/toolbar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mac/carbon/toolbar.cpp b/src/mac/carbon/toolbar.cpp index 7f12f1cc6b..897527f997 100644 --- a/src/mac/carbon/toolbar.cpp +++ b/src/mac/carbon/toolbar.cpp @@ -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