#pragma hdrstop
#endif
+#if wxUSE_TOOLBAR
+
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/app.h"
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);
return TRUE;
}
+#endif // wxUSE_TOOLBAR
+