Added cleanup in Loader dtor and Getter Reset()
[u/mrichter/AliRoot.git] / THijing / AliGenHijing.cxx
index b1167c5..1024241 100644 (file)
@@ -519,7 +519,7 @@ void AliGenHijing::MakeHeader()
     ((AliGenHijingEventHeader*) header)->SetTrials(fTrials);
 // Event Vertex
     header->SetPrimaryVertex(fVertex);
-    gAlice->SetGenEventHeader(header);   
+    if (gAlice) gAlice->SetGenEventHeader(header);   
     fCollisionGeometry = (AliGenHijingEventHeader*)  header;
 }