From e01d9fa9de4e2c966a5c2fa9343969dd13d11580 Mon Sep 17 00:00:00 2001 From: hristov Date: Fri, 3 Feb 2012 13:24:14 +0000 Subject: [PATCH] Coverity 10361 --- PWGPP/TPC/AliTPCPerformanceSummary.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/PWGPP/TPC/AliTPCPerformanceSummary.cxx b/PWGPP/TPC/AliTPCPerformanceSummary.cxx index b98c621290a..3f052dee42b 100644 --- a/PWGPP/TPC/AliTPCPerformanceSummary.cxx +++ b/PWGPP/TPC/AliTPCPerformanceSummary.cxx @@ -539,9 +539,11 @@ Int_t AliTPCPerformanceSummary::AnalyzeDCARPhi(const AliPerformanceTPC* pTPC, TT his3D->GetYaxis()->SetRangeUser(0,1); his3D->GetZaxis()->SetRangeUser(0.35,8); his2D = dynamic_cast(his3D->Project3D("xz")); - his2D->FitSlicesY(0,0,-1,0,"QNR",&arrayWidth); + if (his2D) + his2D->FitSlicesY(0,0,-1,0,"QNR",&arrayWidth); width = dynamic_cast(arrayWidth.At(2)); - nXbins = width->GetNbinsX(); + if (width) + nXbins = width->GetNbinsX(); for(Int_t i=2; iGetBinCenter(i); if(x!=0) @@ -568,9 +570,11 @@ Int_t AliTPCPerformanceSummary::AnalyzeDCARPhi(const AliPerformanceTPC* pTPC, TT //get his2D in C Side his3D->GetYaxis()->SetRangeUser(-1,-0.001); his2D = dynamic_cast(his3D->Project3D("xz")); - his2D->FitSlicesY(0,0,-1,0,"QNR",&arrayWidth); + if (his2D) + his2D->FitSlicesY(0,0,-1,0,"QNR",&arrayWidth); width = dynamic_cast(arrayWidth.At(2)); - nXbins = width->GetNbinsX(); + if (width) + nXbins = width->GetNbinsX(); for(Int_t i=2; iGetBinCenter(i); if(x!=0) -- 2.43.0