]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 892511 ] wxUniversal: fix of segfault in toolbar.cpp
authorJulian Smart <julian@anthemion.co.uk>
Sun, 8 Feb 2004 11:49:22 +0000 (11:49 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 8 Feb 2004 11:49:22 +0000 (11:49 +0000)
Christian Sturmlechner

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/toolbar.cpp

index c0eea0ba8b3a558578c7ccdc1370d66b10cc13f5..74ff8b55e0effb50ad7093cf2572c97eeeba88ed 100644 (file)
@@ -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 )
     {