coverity fix
authorrpreghen <rpreghen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 7 May 2011 09:15:47 +0000 (09:15 +0000)
committerrpreghen <rpreghen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 7 May 2011 09:15:47 +0000 (09:15 +0000)
TOF/AliTOFPreprocessor.cxx

index 8506b65..c78fbe3 100644 (file)
@@ -562,7 +562,11 @@ UInt_t AliTOFPreprocessor::ProcessOnlineDelays()
                  AliInfo("The following sources produced files with the id DELAYS");
                  listTot->Print();
                  for (Int_t jj=0;jj<listTot->GetEntries();jj++){
-                         TObjString * str = dynamic_cast<TObjString*> (listTot->At(jj));
+                   TObjString * str = dynamic_cast<TObjString*> (listTot->At(jj));
+                   if (!str) {
+                     AliError("dynamic_cast returned NULL");
+                                   return 4;
+                         }
                          AliInfo(Form("found source %s", str->String().Data()));
                          
                          // file with summed histos, to extract calib params