Dear ROOT developers,
while debugging a program of mine, I run across something that in my opinion should be fixed in ROOT. If you initialize a class created using TTree::MakeClass() but the generating ROOT file is missing, the class memeber fChain remains a dangling pointer. In fact, in Init(TTree* tree) you can see that:
if (!tree) return;
fChain = tree;
So if tree==NULL, fChain is left pointing to a random memory location.
In my case, when I accessed this non-NULL fChain my program crashed. Fixing it would be easy: in the class constructor just set fChain = NULL before fetching the TTree object from the default file.
Regards,
Riccardo