Browse Source

Fix possible crash on nullptr dereference

Ivan Savenko 1 year ago
parent
commit
31401e219f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/mapping/CMap.cpp

+ 1 - 1
lib/mapping/CMap.cpp

@@ -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();