Detecting if TViewerX3D has been closed

Hi,

How can I detect that an object (window) of the class TViewerX3D has been closed?
With a canvas this is simple, I do a find object with TROOT.

But how do I do this with a TViewerX3D??

Thanks,
Andreas

If you close the viewer3D, the pointer from the pad owning the viewer should be null.
mypad->GetViewer3D()

Rene