Protect against no current file in FinishEvent
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Oct 1999 09:24:40 +0000 (09:24 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Oct 1999 09:24:40 +0000 (09:24 +0000)
MUON/AliMUON.cxx

index 2ea059a..3987e22 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.9  1999/09/29 09:24:20  fca
+Introduction of the Copyright and cvs Log
+
 */
 
 ////////////////////////////////////////////////
@@ -1812,9 +1815,10 @@ void AliMUON::InitTracking(Double_t &seff, Double_t &sb0, Double_t &sbl3)
 void AliMUON::FinishEvent()
 {
     TTree *TK = gAlice->TreeK();
-    TFile *file1 = 0;
-    if (TK) file1 = TK->GetCurrentFile();
-    file1->cd();
+    if (TK) {
+      TFile *file1 = TK->GetCurrentFile();
+      if(file1) file1->cd();
+    }
 }
 
 void AliMUON::CloseTracking()