diff --git a/src/TrackedObjectBBox.cpp b/src/TrackedObjectBBox.cpp index bd042c10..263e3904 100644 --- a/src/TrackedObjectBBox.cpp +++ b/src/TrackedObjectBBox.cpp @@ -383,9 +383,11 @@ void TrackedObjectBBox::SetJsonValue(const Json::Value root) // Set the id of the child clip if (!root["child_clip_id"].isNull() && root["child_clip_id"].asString() != "" && root["child_clip_id"].asString() != Id()){ Clip* parentClip = (Clip *) ParentClip(); - - if (root["child_clip_id"].asString() != parentClip->Id()) - ChildClipId(root["child_clip_id"].asString()); + if (parentClip && root["child_clip_id"].asString() != parentClip->Id()) { + ChildClipId(root["child_clip_id"].asString()); + } else if (parentClip == NULL) { + ChildClipId(root["child_clip_id"].asString()); + } } // Set the Keyframes by the given JSON object