From fbd278632931613d368de1a4b39b732b9785e19b Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 7 Nov 2015 15:07:18 +0000 Subject: (svn r27438) -Fix (r27346) [FS#6387]: The build object hotkey no longer checked whether there were any objects defined. --- src/object_gui.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/object_gui.cpp') 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(&_build_object_desc, 0); + /* Don't show the place object button when there are no objects to place. */ + if (ObjectClass::GetUIClassCount() > 0) { + AllocateWindowDescFront(&_build_object_desc, 0); + } } /** Reset all data of the object GUI. */ -- cgit v1.2.3-54-g00ecf