(svn r17164) -Fix: crash when clicking on the spacer in the build airport GUI

This commit is contained in:
smatz 2009-08-13 12:49:51 +00:00
parent e74ca21912
commit bd6acb36ae
1 changed files with 3 additions and 3 deletions

View File

@ -90,9 +90,9 @@ struct BuildAirToolbarWindow : Window {
virtual void OnClick(Point pt, int widget)
{
if (widget - ATW_AIRPORT >= 0) {
_build_air_button_proc[widget - ATW_AIRPORT](this);
}
if (!IsInsideBS(widget, ATW_AIRPORT, lengthof(_build_air_button_proc))) return;
_build_air_button_proc[widget - ATW_AIRPORT](this);
}