Hi Kalen, try this : #include <TFile.h> int main() { TFile* f ; cout << "pointer value : " << f << endl ; f->IsOpen(); return 0; } and you'll see your pointer is NULL that's why you get a seg. fault when calling IsOpen() . seb. On Tue, 29 Apr 2003, Kalen Martens wrote: > Hi, > > In the following 3 line program, I would expect that IsOpen will return > false since the TFile pointer doesn't point to anything. Instead, I get a > segmantation fault. This happens with both v3.04-02 and v3.03-09. > > #include <TFile.h> > main() > { > TFile* f; > f -> IsOpen(); > return 0; > } > > > I don't think I should get a segmentation violation here. There are a few > cases where f -> IsOpen() returning false would be very useful. I was > wondering if this behavior could be implemented. > > Chhers, > -Kalen > > ----------------------------------------------------------------- > - Kalen Martens Ph:(416)-978-6632 - > - Dept. of Physics - > - University of Toronto, Toronto, Canada - > ----------------------------------------------------------------- > >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET