Coverity fixes (Philippe)
authormartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 Mar 2011 14:49:43 +0000 (14:49 +0000)
committermartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 Mar 2011 14:49:43 +0000 (14:49 +0000)
PWG3/muon/AliHistogramCollection.cxx

index ca9ea97..de48104 100644 (file)
@@ -383,6 +383,10 @@ AliHistogramCollection::Merge(TCollection* list)
   while ( ( o = next() ) )
   {
     AliHistogramCollection* hcol = dynamic_cast<AliHistogramCollection*>(o);
+    if (!hcol) {
+      AliFatal(Form("object named \"%s\" is a %s instead of an AliHistogramCollection!", o->GetName(), o->ClassName()));
+      continue;
+    }
     
     ++count;