Coverity fixes.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Jan 2011 18:58:04 +0000 (18:58 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Jan 2011 18:58:04 +0000 (18:58 +0000)
PWG4/JetTasks/AliAnalysisTaskJetsTM.cxx

index e0cca54..22d46ce 100644 (file)
@@ -81,7 +81,18 @@ void AliAnalysisTaskJetsTM::UserExec(Option_t *)
   }
 
   AliAODEvent* aodE  = dynamic_cast<AliAODEvent*>  (fInputEvent);
+
+  if (!aodE) {
+    Printf("ERROR: AOD not available");
+    return;
+  }
+
   TClonesArray* jets = dynamic_cast<TClonesArray*> (aodE->FindListObject("jetsAOD_FASTKT04"));
+  if (!jets) {
+    Printf("ERROR: Jet branch not available");
+    return;
+  }
+
   Int_t nJ = jets->GetEntries();
 
   Float_t ptmax = 0.;