1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Fix crash with cutting random town

This commit is contained in:
nordsoft
2023-04-02 14:06:16 +04:00
parent 4d6b88f10d
commit 1e5362cb07

View File

@@ -256,6 +256,8 @@ public:
h & townAndVis;
BONUS_TREE_DESERIALIZATION_FIX
if(town)
{
vstd::erase_if(builtBuildings, [this](BuildingID building) -> bool
{
if(!town->buildings.count(building) || !town->buildings.at(building))
@@ -265,6 +267,7 @@ public:
}
return false;
});
}
h & overriddenBuildings;