Added protection for null pointer
authorfprino <prino@to.infn.it>
Tue, 12 Aug 2014 09:51:56 +0000 (11:51 +0200)
committerfprino <prino@to.infn.it>
Tue, 12 Aug 2014 09:51:56 +0000 (11:51 +0200)
PWGHF/vertexingHF/AliVertexingHFUtils.cxx

index 00e4db8..4e1814a 100644 (file)
@@ -320,7 +320,7 @@ void AliVertexingHFUtils::AveragePt(Float_t& averagePt, Float_t& errorPt,Float_t
 Bool_t AliVertexingHFUtils::CheckT0TriggerFired(AliAODEvent* aodEv){
   // check if T0VTX trigger was fired, based on a workaround suggested by Alla
   const Double32_t *mean = aodEv->GetT0TOF();
-  if(mean[0]<9999.) return kTRUE;
+  if(mean && mean[0]<9999.) return kTRUE;
   else return kFALSE;
 }
 //____________________________________________________________________________