- wxCHECK_MSG( pos <= GetToolsCount(), (wxToolBarToolBase *)NULL,
- _T("invalid position in wxToolBar::InsertTool()") );
-
- wxToolBarToolBase *tool = CreateTool(id, label, bitmap, bmpDisabled, kind,
- clientData, shortHelp, longHelp);
-
- if ( !InsertTool(pos, tool) )
- {
- delete tool;
-
- return NULL;
- }
+ wxCHECK_MSG( pos <= GetToolsCount(), NULL,
+ wxT("invalid position in wxToolBar::InsertTool()") );