summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/object_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index f39700df2..6603ed1bc 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -619,7 +619,7 @@ void GenerateObjects()
SetGeneratingWorldProgress(GWP_OBJECT, radiotower_to_build + lighthouses_to_build);
- for (uint i = ScaleByMapSize(1000); i != 0; i--) {
+ for (uint i = ScaleByMapSize(1000); i != 0 && Object::CanAllocateItem(); i--) {
TileIndex tile = RandomTile();
uint h;