]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
coverity fix 2
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 12 Apr 2012 06:53:17 +0000 (06:53 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 12 Apr 2012 06:53:17 +0000 (06:53 +0000)
ANALYSIS/TenderSupplies/AliEMCALTenderSupply.cxx

index e04b780d17be9ac4b61c4089c10524202e7d8b80..556a6dbe4187fc3dc18c9810cbbd35571e463c17 100644 (file)
@@ -1035,10 +1035,11 @@ Int_t AliEMCALTenderSupply::InitRecParam()
   // load some default on OCDB failure
   
   Int_t runNum = -1;
-  AliCDBManager    * man  = 0x0 ;
-  TObjArray        * arr  = 0x0 ;
-  AliEMCALRecParam * pars = 0x0 ;
-  const AliESDRun  * run  = 0x0 ;
+  AliCDBManager    * man   = 0x0 ;
+  TObjArray        * arr   = 0x0 ;
+  AliEMCALRecParam * pars  = 0x0 ;
+  AliCDBEntry      * entry = 0x0;
+  const AliESDRun  * run   = 0x0 ;
   TString beamType ;
   
   // clean the previous reco params, if those came from OCDB
@@ -1069,8 +1070,11 @@ Int_t AliEMCALTenderSupply::InitRecParam()
   man = AliCDBManager::Instance();
 
   // load the file data
-  if(man->Get("EMCAL/Calib/RecoParam", runNum))
-    arr = (TObjArray*)(man->Get("EMCAL/Calib/RecoParam", runNum)->GetObject());
+  if(man)
+    entry = man->Get("EMCAL/Calib/RecoParam", runNum);
+  
+  if( entry )
+    arr = (TObjArray*)(entry->GetObject());
   
   if( arr ){
     // load given parameters based on beam type