mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Fix possible crash on nullptr dereference
This commit is contained in:
@ -700,7 +700,7 @@ void CMap::resolveQuestIdentifiers()
|
||||
//FIXME: move to CMapLoaderH3M
|
||||
for (auto & quest : quests)
|
||||
{
|
||||
if (quest->killTarget != ObjectInstanceID::NONE)
|
||||
if (quest && quest->killTarget != ObjectInstanceID::NONE)
|
||||
quest->killTarget = questIdentifierToId[quest->killTarget.getNum()];
|
||||
}
|
||||
questIdentifierToId.clear();
|
||||
|
Reference in New Issue
Block a user