The smallest change of 2012

This commit is contained in:
otfallen 2012-10-08 01:03:33 +00:00
parent ec8a9eddf2
commit f26b359ae5
1 changed files with 2 additions and 3 deletions

View File

@ -191,10 +191,9 @@ void ThingTypeManager::parseItemType(uint16 id, TiXmlElement* elem)
itemType = ItemTypePtr(new ItemType); itemType = ItemTypePtr(new ItemType);
itemType->setServerId(serverId); itemType->setServerId(serverId);
addItemType(itemType); addItemType(itemType);
} } else
itemType = getItemType(serverId); itemType = getItemType(serverId);
assert(itemType && "Internal error");
itemType->setName(elem->Attribute("name")); itemType->setName(elem->Attribute("name"));
for(TiXmlElement* attrib = elem->FirstChildElement(); attrib; attrib = attrib->NextSiblingElement()) { for(TiXmlElement* attrib = elem->FirstChildElement(); attrib; attrib = attrib->NextSiblingElement()) {
std::string key = attrib->Attribute("key"); std::string key = attrib->Attribute("key");