protect against zero pointer
authormverweij <marta.verweij@cern.ch>
Thu, 5 Jun 2014 15:12:02 +0000 (17:12 +0200)
committermverweij <marta.verweij@cern.ch>
Thu, 5 Jun 2014 15:12:13 +0000 (17:12 +0200)
PWG/EMCAL/AliEmcalClusTrackMatcherTask.cxx

index 511dc52..74dc55f 100644 (file)
@@ -242,7 +242,7 @@ Bool_t AliEmcalClusTrackMatcherTask::Run()
     } else {
       ec = dynamic_cast<AliESDCaloCluster*>(clust);
       TArrayI *arr = ec->GetTracksMatched(); 
-      arr->Set(0);
+      if(arr) arr->Set(0);
     }
     const Int_t N = partC->GetNumberOfMatchedObj();
     if (N <= 0)