forked from mirror/OpenTTD
(svn r17164) -Fix: crash when clicking on the spacer in the build airport GUI
This commit is contained in:
@@ -90,9 +90,9 @@ struct BuildAirToolbarWindow : Window {
|
|||||||
|
|
||||||
virtual void OnClick(Point pt, int widget)
|
virtual void OnClick(Point pt, int widget)
|
||||||
{
|
{
|
||||||
if (widget - ATW_AIRPORT >= 0) {
|
if (!IsInsideBS(widget, ATW_AIRPORT, lengthof(_build_air_button_proc))) return;
|
||||||
_build_air_button_proc[widget - ATW_AIRPORT](this);
|
|
||||||
}
|
_build_air_button_proc[widget - ATW_AIRPORT](this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user