mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-01 00:45:26 +02:00
Merge pull request #1848 from Nordsoft91/editor-fix
Fix map editor crash with cutting random town
This commit is contained in:
@ -256,6 +256,8 @@ public:
|
|||||||
h & townAndVis;
|
h & townAndVis;
|
||||||
BONUS_TREE_DESERIALIZATION_FIX
|
BONUS_TREE_DESERIALIZATION_FIX
|
||||||
|
|
||||||
|
if(town)
|
||||||
|
{
|
||||||
vstd::erase_if(builtBuildings, [this](BuildingID building) -> bool
|
vstd::erase_if(builtBuildings, [this](BuildingID building) -> bool
|
||||||
{
|
{
|
||||||
if(!town->buildings.count(building) || !town->buildings.at(building))
|
if(!town->buildings.count(building) || !town->buildings.at(building))
|
||||||
@ -265,6 +267,7 @@ public:
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
h & overriddenBuildings;
|
h & overriddenBuildings;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user