Fix for Coverity defect 11103: FORWARD_NULL
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Feb 2011 11:03:10 +0000 (11:03 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Feb 2011 11:03:10 +0000 (11:03 +0000)
THbtp/AliGenHBTprocessor.cxx

index 2090dbb..bb8d8a9 100644 (file)
@@ -944,9 +944,10 @@ Int_t  AliGenHBTprocessor::GetNumberOfTracks()
   { 
     if (i >= GetNumberOfEvents()) break; //protection not to overshoot nb of events
     AliStack* stack = cab->GetStack(i);
-    if (stack == 0x0)
+    if (stack == 0x0) {
      Error("GetNumberOfTracks","There is no stack %d",i);
-
+     continue;
+    }
     n+=stack->GetNprimary();
   }
  return n;