mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-05 00:49:09 +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;
|
||||
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;
|
||||
|
||||
|
Reference in New Issue
Block a user