Filling tree with null pointers

Hi,

I have a problem that still haven’t tracked completely down but at this point it seems as if, when I fill the tree it will crash when I have one of the pointer data members set to zero. It is weird because that didn’t happen before with the same code (or at least I think so)

My class is just some pointers with setters and getters, but the pointers are some times set to zero.

I know it is not a well defined question so far, so the question could be rephrased as:

are there instances in which having null pointers in the event could make the program crash while filling the tree (TTree::Fill)?

I don’t intend to take much of other people’s time but I’d like to know.

Hi,

The only case where it could be a problem is if you defined your data member as follow

myclass *ptr; //-> the -> tell ROOT it can assume that the ptr will never be null.
To be able to resolve any other issue, we would need a current example showing the problem.

Cheers,
Philippe