Ignore invalid fields in the state file.

Refs #5039
This commit is contained in:
Gunnar Beutner 2013-11-09 18:30:17 +01:00
parent 112f26dc19
commit 17834e0a77
1 changed files with 5 additions and 1 deletions

View File

@ -175,7 +175,11 @@ static Object::Ptr DeserializeObject(const Object::Ptr& object, const Dictionary
if (!input->Contains(field.Name))
continue;
instance->SetField(i, Deserialize(input->Get(field.Name), attributeTypes));
try {
instance->SetField(i, Deserialize(input->Get(field.Name), attributeTypes));
} catch (const std::exception&) {
instance->SetField(i, Empty);
}
}
return instance;