protections against failures in deleting event content
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliJetModelBaseTask.cxx
index 97e4f51..bc964af 100644 (file)
@@ -289,6 +289,7 @@ void AliJetModelBaseTask::ExecOnce()
     }
 
     if (fCopyArray) {
+      fOutTracks->Delete();
       if (!(InputEvent()->FindListObject(fOutTracksName)))
        InputEvent()->AddObject(fOutTracks);
     }
@@ -321,6 +322,7 @@ void AliJetModelBaseTask::ExecOnce()
     }
 
     if (fCopyArray) {
+      fOutClusters->Delete();
       if (!(InputEvent()->FindListObject(fOutCaloName)))
        InputEvent()->AddObject(fOutClusters);
     }