Greetings,
I’m currently using a compiled ROOT program in which canvases are deleted dynamically.
However, the program crashes if a pointer to a canvas that is to be deleted has already been “closed” by the user. What should be the right way to check that a pointer to a canvas is still valid ?
it does not seem to be possible to check whether variable exists or not before trying to use it, which seems to be needed in an environment where variables are deleted in a sneaky manner.
P.S. this is totally against C++ rules. Perhaps better to set pointer to NULL instead of deleting it ??? Then I just have to check whether it is NULL, which is totally in sync with C++.