X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4e89ceb11ee28f55050dfc03c69e72cd84f98cdf..304862976530be1315f3861157168f6edea2195e:/src/univ/toolbar.cpp diff --git a/src/univ/toolbar.cpp b/src/univ/toolbar.cpp index c995466a66..e17794b8ce 100644 --- a/src/univ/toolbar.cpp +++ b/src/univ/toolbar.cpp @@ -29,6 +29,8 @@ #pragma hdrstop #endif +#if wxUSE_TOOLBAR + #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/app.h" @@ -652,7 +654,7 @@ bool wxStdToolbarInputHandler::HandleMouse(wxInputConsumer *consumer, wxToolBar *tbar = wxStaticCast(consumer->GetInputWindow(), wxToolBar); wxToolBarToolBase *tool = tbar->FindToolForPosition(event.GetX(), event.GetY()); - if ( tool && !tool->IsEnabled() ) + if ( !tool || !tool->IsEnabled() ) return TRUE; return wxStdButtonInputHandler::HandleMouse(consumer, event); @@ -705,3 +707,5 @@ bool wxStdToolbarInputHandler::HandleActivation(wxInputConsumer *consumer, return TRUE; } +#endif // wxUSE_TOOLBAR +