X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/61fef19b852d426f5b00b60de083539b9ba0f76c..005198fa7d8e244f9c9c28263c8eca5a9ced8e16:/src/univ/toolbar.cpp?ds=sidebyside diff --git a/src/univ/toolbar.cpp b/src/univ/toolbar.cpp index f4cf7740fa..74ff8b55e0 100644 --- a/src/univ/toolbar.cpp +++ b/src/univ/toolbar.cpp @@ -18,7 +18,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "univtoolbar.h" #endif @@ -645,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 ) {