- fixing coverity
authorodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Mar 2011 16:51:47 +0000 (16:51 +0000)
committerodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Mar 2011 16:51:47 +0000 (16:51 +0000)
HLT/EVE/AliHLTEveMultCorr.cxx

index 839d8d0..16f5ad7 100644 (file)
@@ -257,16 +257,19 @@ void AliHLTEveMultCorr::AddHistogramToCanvas(TH1* hist, TCanvas* canvas, Int_t&
         else if (!strcmp(hist->ClassName(), "TH2F"))
         {
            canvas->cd(cdCount);
+           TH2F *h = dynamic_cast<TH2F*>(hist);
            if(zoom)
            {
-             TH2F *h = dynamic_cast<TH2F*>(hist);
              if(h)
                {
                  h->GetXaxis()->SetRange(0, (Int_t) (h->GetMaximumBin() + h->GetMaximumBin()*0.2));
                  h->GetYaxis()->SetRange(0, (Int_t) (h->GetMaximumBin() + h->GetMaximumBin()*0.2));
                }
            }
-            dynamic_cast<TH2F*>(hist)->Draw("COLZ");
+            if(h)
+           {
+             h->Draw("COLZ");
+           }
         }
         else
         {