Protection added.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Sep 2009 15:34:17 +0000 (15:34 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Sep 2009 15:34:17 +0000 (15:34 +0000)
STEER/AliAODHandler.cxx

index 05a6e89..b93b6ab 100644 (file)
@@ -194,6 +194,8 @@ void AliAODHandler::StoreMCParticles(){
 
   // get the MC vertex
   AliGenEventHeader* genHeader = header->GenEventHeader();
+  if (!genHeader) return;
+  
   TArrayF vtxMC(3);
   genHeader->PrimaryVertex(vtxMC);
   mcHeader->SetVertex(vtxMC[0],vtxMC[1],vtxMC[2]);