]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/TTreeStream.cxx
Do not replace the tree if it exists and is empty
[u/mrichter/AliRoot.git] / STEER / TTreeStream.cxx
index 445f1fb5825bec547d2dafa2470deded8a23f338..2287454cc2d547bb73d2acd071c97f16970298bd 100644 (file)
@@ -400,8 +400,8 @@ void TTreeStream::BuildTree(){
   //
   // Build the Tree
   //
-  if (fTree->GetEntries()>0) return;
-  fTree = new TTree(GetName(),GetName());
+  if (fTree && fTree->GetEntries()>0) return;
+  if (!fTree)  fTree = new TTree(GetName(),GetName());
   Int_t entries = fElements->GetEntriesFast();  
   fBranches = new TObjArray(entries);