mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-15 20:03:15 +02:00
Fixed crashes on loading with Tides of War mod
This commit is contained in:
@@ -541,7 +541,7 @@ void TargetCondition::loadConditions(const JsonNode & source, bool exclusive, bo
|
|||||||
|
|
||||||
CModHandler::parseIdentifier(keyValue.first, scope, type, identifier);
|
CModHandler::parseIdentifier(keyValue.first, scope, type, identifier);
|
||||||
|
|
||||||
item = itemFactory->createConfigurable(scope, type, identifier);
|
item = itemFactory->createConfigurable(keyValue.second.meta, type, identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(item)
|
if(item)
|
||||||
|
@@ -250,7 +250,10 @@ void Timed::serializeJsonUnitEffect(JsonSerializeFormat & handler)
|
|||||||
auto guard = handler.enterStruct(p.first);
|
auto guard = handler.enterStruct(p.first);
|
||||||
const JsonNode & bonusNode = handler.getCurrent();
|
const JsonNode & bonusNode = handler.getCurrent();
|
||||||
auto b = JsonUtils::parseBonus(bonusNode);
|
auto b = JsonUtils::parseBonus(bonusNode);
|
||||||
|
if (b)
|
||||||
bonus.push_back(b);
|
bonus.push_back(b);
|
||||||
|
else
|
||||||
|
logMod->error("Failed to parse bonus '%s'!", p.first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user