Added handling of null
This commit is contained in:
parent
8b3944f51c
commit
e5e89a3ac9
@ -62,7 +62,7 @@ unsigned int JSONObject::getUniqueID() const
|
||||
return 0xffffffff;
|
||||
}
|
||||
const JSONValue<unsigned int>* uid = dynamic_cast<JSONValue<unsigned int>*>(iterator->second.get());
|
||||
return uid->getValue();
|
||||
return uid ? uid->getValue() : 0xffffffff;
|
||||
}
|
||||
|
||||
void JSONObject::addChild(const std::string& type, JSONObject* child)
|
||||
|
Loading…
Reference in New Issue
Block a user