summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-03-20 20:51:31 +0000
committerrubidium <rubidium@openttd.org>2011-03-20 20:51:31 +0000
commite645a2e06687d2c16ab0addc218b2362ef9cd295 (patch)
tree736f1da884d52964b379270b67db739d0dbe8c61
parent99c0e14fa09fa55787ca2c0fae33f14da72dcb8a (diff)
downloadopenttd-e645a2e06687d2c16ab0addc218b2362ef9cd295.tar.xz
(svn r22266) -Fix [FS#4558]: In the scenario editor you could build a ship depot using the hotkeys. Removing that depot causes an assertions to trigger.
-rw-r--r--src/dock_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp
index f7c50fc6a..a098a267a 100644
--- a/src/dock_gui.cpp
+++ b/src/dock_gui.cpp
@@ -136,7 +136,6 @@ struct BuildDocksToolbarWindow : Window {
virtual void OnClick(Point pt, int widget, int click_count)
{
- this->last_clicked_widget = (DockToolbarWidgets)widget;
switch (widget) {
case DTW_CANAL: // Build canal button
HandlePlacePushButton(this, DTW_CANAL, SPR_CURSOR_CANAL, HT_RECT);
@@ -174,8 +173,9 @@ struct BuildDocksToolbarWindow : Window {
HandlePlacePushButton(this, DTW_BUILD_AQUEDUCT, SPR_CURSOR_AQUEDUCT, HT_SPECIAL);
break;
- default: break;
+ default: return;
}
+ this->last_clicked_widget = (DockToolbarWidgets)widget;
}
virtual EventState OnKeyPress(uint16 key, uint16 keycode)