diff --git a/src/osgPlugins/osgjs/JSON_Objects.cpp b/src/osgPlugins/osgjs/JSON_Objects.cpp index 9f8da7479..4e4731d79 100644 --- a/src/osgPlugins/osgjs/JSON_Objects.cpp +++ b/src/osgPlugins/osgjs/JSON_Objects.cpp @@ -62,7 +62,7 @@ unsigned int JSONObject::getUniqueID() const return 0xffffffff; } const JSONValue* uid = dynamic_cast*>(iterator->second.get()); - return uid->getValue(); + return uid ? uid->getValue() : 0xffffffff; } void JSONObject::addChild(const std::string& type, JSONObject* child)