Mercurial > hg > openttd
changeset 12701:512b7a8fbef4 draft
(svn r17164) -Fix: crash when clicking on the spacer in the build airport GUI
author | smatz <smatz@openttd.org> |
---|---|
date | Thu, 13 Aug 2009 12:49:51 +0000 |
parents | 71525ee8f8bb |
children | 1eced866ed17 |
files | src/airport_gui.cpp |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -90,9 +90,9 @@ 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); }