Protections for null pointers added
authorgvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 Dec 2012 09:01:45 +0000 (09:01 +0000)
committergvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 Dec 2012 09:01:45 +0000 (09:01 +0000)
HMPID/AliHMPIDTracker.cxx

index 72a9c8f..1fdc011 100644 (file)
@@ -60,7 +60,9 @@ Bool_t AliHMPIDTracker::GetTrackPoint(Int_t idx, AliTrackPoint& point) const
   iClu = iClu%1000; //GetHMPIDcluIdx -> 1e+6*ch + 1e+3*clusize + cluIdx;
   point.SetVolumeID(AliGeomManager::LayerToVolUID(AliGeomManager::kHMPID,iCham));//layer and chamber number
   TClonesArray *pArr=(TClonesArray*)(*fClu)[iCham];
+  if(!pArr) return kFALSE;
   AliHMPIDCluster *pClu=(AliHMPIDCluster*)pArr->UncheckedAt(iClu);//get pointer to cluster
+  if(!pClu) return kFALSE;
   Float_t xyz[3];
   pClu->GetGlobalXYZ(xyz);
   Float_t cov[6];