diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index f39700df2a..6603ed1bcd 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;