Coverity fix for uninitialized variables and check for returned null value
authorvulpescu <vulpescu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Jun 2012 12:13:59 +0000 (12:13 +0000)
committervulpescu <vulpescu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Jun 2012 12:13:59 +0000 (12:13 +0000)
MUON/AliMUONResponseTriggerV1.cxx

index 4785b96..28c3e1e 100644 (file)
@@ -236,11 +236,15 @@ void AliMUONResponseTriggerV1::SetHV()
   AliCDBManager *manager = AliCDBManager::Instance();
   AliCDBPath path("MUON/Calib/TriggerDCS");
   AliCDBEntry *entry = manager->Get(path);
+  if (entry == NULL) {
+    AliWarning("No map found in MUON/Calib/TriggerDCS");
+    return;
+  }
   TMap *hvMap = dynamic_cast<TMap*>(entry->GetObject());
   TObjArray *objArr = 0x0;
   
   AliDCSValue *dcsValue = 0x0;
-  UInt_t time1,time2,timebegin,timeend;
+  UInt_t time1,time2,timebegin=0,timeend=0;
   Int_t nEntries;
   Float_t voltage = 0;