From 260c6fd45b27521be9f3f1cb3f5e78456a52e737 Mon Sep 17 00:00:00 2001 From: gconesab Date: Thu, 12 Apr 2012 06:53:17 +0000 Subject: [PATCH] coverity fix 2 --- ANALYSIS/TenderSupplies/AliEMCALTenderSupply.cxx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ANALYSIS/TenderSupplies/AliEMCALTenderSupply.cxx b/ANALYSIS/TenderSupplies/AliEMCALTenderSupply.cxx index e04b780d17b..556a6dbe418 100644 --- a/ANALYSIS/TenderSupplies/AliEMCALTenderSupply.cxx +++ b/ANALYSIS/TenderSupplies/AliEMCALTenderSupply.cxx @@ -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 -- 2.43.0