Empty Tree

This is probably a very easy question for you guys. But when i use
TTree * tree = (TTree*)gDirectory->Get(file);

How do i know if tree is empty or not? that it is a tree in gdriectory called whatever the variable file is assign to be.

Simply test the return value. if tree is null the object doest not exist
in the file.

Rene

I had already done that, but miss spelled NULL and therfore i didn’t think that worked. Sometimes i think that not the brightest crayon in the box…