Root attempts to stream null pointers to abstract classes?

Hello,

in the attached example I try to stream an object of a class (“TH1Wrapper”) containing a pointer field (“fMyHisto”) of type TH1*. If the pointer field is initialized to NULL, when I try to stream the TH1Wrapper object root throws this error:

Error in <TClass::New>: cannot create object of class TH1

(TH1 is an abstract class so clearly an object of this type cannot be created.)

It works flawless if the pointer field is initialized to an object of any class derived from TH1 instead of being NULL.

Is this a bug? Why is root trying to create the object?

Thanks,
Salvatore

TestTH1Streamer.C (779 Bytes)

For the record, this problems seem to be have been solved (checked in v6.12/06)