Hi Alexander,
I've added the checks. Thanks for the suggestion.
Cheers, Fons.
>
> Dear all!
>
> The string
> TIter it(NULL); it();
> produces:
> *** Break *** Segmentation violation
>
> May be it will be good to do some internal checks in TIterator?
> I think it is better to have
>
> void better(TList *l)
> {
> TIter it(l);
> while( TObject *o=it() )
> .....
> }
>
> than
>
> void worse(TList *l)
> {
> if( NULL!=l )
> {
> TIter it(l);
> while( TObject *o=it() )
> .....
> }
> }
>
> better(NULL);
> worse (NULL);
>
> Alexander Zvyagin.
>
--
Org: CERN, European Laboratory for Particle Physics.
Mail: 1211 Geneve 23, Switzerland Phone: +41 22 7679248
E-Mail: Fons.Rademakers@cern.ch Fax: +41 22 7677910
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:30 MET