mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Fix crash on selecting scenario with "start with strongest hero from
scenario X" starting bonus
This commit is contained in:
parent
2d9e42b623
commit
1a6aae9363
@ -369,7 +369,7 @@ JsonNode CampaignState::crossoverSerialize(CGHeroInstance * hero) const
|
||||
CGHeroInstance * CampaignState::crossoverDeserialize(const JsonNode & node, CMap * map) const
|
||||
{
|
||||
JsonDeserializer handler(nullptr, const_cast<JsonNode&>(node));
|
||||
auto * hero = new CGHeroInstance(map->cb);
|
||||
auto * hero = new CGHeroInstance(map ? map->cb : nullptr);
|
||||
hero->ID = Obj::HERO;
|
||||
hero->serializeJsonOptions(handler);
|
||||
if (map)
|
||||
|
Loading…
Reference in New Issue
Block a user