Additional protection added.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Sep 2008 15:45:18 +0000 (15:45 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Sep 2008 15:45:18 +0000 (15:45 +0000)
STEER/AliMCEventHandler.cxx

index 622cf272ea67ca3d3aa1c2fcd6dc050b52383835..209e93289657d47c29d564b388cdd50951d60614 100644 (file)
@@ -287,7 +287,7 @@ Bool_t AliMCEventHandler::Notify(const char *path)
 void AliMCEventHandler::ResetIO()
 {
 //  Clear header and stack
-    fMCEvent->Clean();
+    if (fInitOk) fMCEvent->Clean();
     
 // Delete Tree E
     delete fTreeE; fTreeE = 0;
@@ -306,7 +306,7 @@ Bool_t AliMCEventHandler::FinishEvent()
     // Clean-up after each event
     delete fDirTR;  fDirTR = 0;
     delete fDirK;   fDirK  = 0;    
-    fMCEvent->FinishEvent();
+    if (fInitOk) fMCEvent->FinishEvent();
     return kTRUE;
 }