summaryrefslogtreecommitdiff
path: root/src/object_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object_gui.cpp')
-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. */