summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2015-11-07 15:07:18 +0000
committerfrosch <frosch@openttd.org>2015-11-07 15:07:18 +0000
commitfbd278632931613d368de1a4b39b732b9785e19b (patch)
treef4d255d8d906f066df3db76ad9261bd2220f4da2 /src
parentad48714852fe69a77b2f240bbd00fd22a8210222 (diff)
downloadopenttd-fbd278632931613d368de1a4b39b732b9785e19b.tar.xz
(svn r27438) -Fix (r27346) [FS#6387]: The build object hotkey no longer checked whether there were any objects defined.
Diffstat (limited to 'src')
-rw-r--r--src/object_gui.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/object_gui.cpp b/src/object_gui.cpp
index 220f4e385..57c45d09c 100644
--- a/src/object_gui.cpp
+++ b/src/object_gui.cpp
@@ -526,7 +526,10 @@ static WindowDesc _build_object_desc(
*/
void ShowBuildObjectPicker()
{
- AllocateWindowDescFront<BuildObjectWindow>(&_build_object_desc, 0);
+ /* Don't show the place object button when there are no objects to place. */
+ if (ObjectClass::GetUIClassCount() > 0) {
+ AllocateWindowDescFront<BuildObjectWindow>(&_build_object_desc, 0);
+ }
}
/** Reset all data of the object GUI. */