Accessing obj_meta->parent resulting in segmentation fault

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) --Xavier
• DeepStream Version– 5.0
• TensorRT Version–7.1

I’m working on a pipeline with peoplenet as PGIE and retinaface as SGIE.
How can i access the parent metadata such as bbox information passed to sgie infer. I tried printing the parent pointer field of NvDsObjectmeta but it is giving 0 and also accessing fields of this pointer using obj_meta->parent->class_id is resulting in segmentation fault. What would be the right way to access pointer to the parent object meta?

The field will NULL if it’s pgie.

/** Holds a pointer to the parent @ref NvDsObjectMeta. Set to NULL if    no parent exists. */   struct _NvDsObjectMeta *parent;