diff --git a/lib/campaign/CampaignState.cpp b/lib/campaign/CampaignState.cpp index b3e4fe3a2..335722d24 100644 --- a/lib/campaign/CampaignState.cpp +++ b/lib/campaign/CampaignState.cpp @@ -369,7 +369,7 @@ JsonNode CampaignState::crossoverSerialize(CGHeroInstance * hero) const CGHeroInstance * CampaignState::crossoverDeserialize(const JsonNode & node, CMap * map) const { JsonDeserializer handler(nullptr, const_cast(node)); - auto * hero = new CGHeroInstance(map->cb); + auto * hero = new CGHeroInstance(map ? map->cb : nullptr); hero->ID = Obj::HERO; hero->serializeJsonOptions(handler); if (map)