]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fix against NULL pointer (Sergey Gorbunov)
authorjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 3 Nov 2010 15:27:07 +0000 (15:27 +0000)
committerjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 3 Nov 2010 15:27:07 +0000 (15:27 +0000)
PWG0/dNdPt/AlidNdPtAnalysisPbPb.cxx

index acdc0b86cf38f9eb5d6298df0491234f9559a674..d9bee182cb1470f9d53fb57562d8321338826052 100644 (file)
@@ -1153,7 +1153,8 @@ Long64_t AlidNdPtAnalysisPbPb::Merge(TCollection* const list)
 
     // physics selection
     //printf("entry->GetPhysicsTriggerSelection() %p \n", entry->GetPhysicsTriggerSelection());
-    collPhysSelection->Add(entry->GetPhysicsTriggerSelection());
+    AliPhysicsSelection *physSel = entry->GetPhysicsTriggerSelection();
+    if( physSel ) collPhysSelection->Add(physSel); 
     
     //
     fTrackPtCorrelationMatrix->Add(entry->fTrackPtCorrelationMatrix);
@@ -1209,7 +1210,7 @@ Long64_t AlidNdPtAnalysisPbPb::Merge(TCollection* const list)
   }
 
   AliPhysicsSelection *trigSelection = GetPhysicsTriggerSelection();
-  trigSelection->Merge(collPhysSelection);
+  if( trigSelection ) trigSelection->Merge(collPhysSelection);
   if(collPhysSelection) delete collPhysSelection;
 
 return count;