浏览代码

Fix potential assertion failure on map load

Ivan Savenko 2 年之前
父节点
当前提交
9565cae3cb
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lib/mapObjects/CGHeroInstance.cpp

+ 2 - 1
lib/mapObjects/CGHeroInstance.cpp

@@ -1000,7 +1000,8 @@ std::string CGHeroInstance::getNameTextID() const
 	if (type)
 	if (type)
 		return type->getNameTextID();
 		return type->getNameTextID();
 
 
-	assert(0);
+	// FIXME: called by logging from some specialties (mods?) before type is set on deserialization
+	// assert(0);
 	return "";
 	return "";
 }
 }