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