X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1169a91932273bc84c23ed9dbd0a2da064d59d66..6b707fc394b2601878996dc7581c6d7427f8f4dd:/src/univ/toolbar.cpp diff --git a/src/univ/toolbar.cpp b/src/univ/toolbar.cpp index 45879f6613..74ff8b55e0 100644 --- a/src/univ/toolbar.cpp +++ b/src/univ/toolbar.cpp @@ -138,23 +138,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl); // wxToolBar creation // ---------------------------------------------------------------------------- -wxToolBar::wxToolBar() -{ - Init(); -} - -wxToolBar::wxToolBar(wxWindow *parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - Init(); - - Create(parent, id, pos, size, style, name); -} - void wxToolBar::Init() { // no tools yet @@ -662,6 +645,8 @@ bool wxToolBar::PerformAction(const wxControlAction& action, const wxString& strArg) { wxToolBarTool *tool = (wxToolBarTool*) FindById(numArg); + if (!tool) + return false; if ( action == wxACTION_TOOLBAR_TOGGLE ) {