Skip to content

Commit

Permalink
[hist] Check fBins in GetNumberOfBins().
Browse files Browse the repository at this point in the history
  • Loading branch information
hqucms committed Sep 3, 2024
1 parent 6214a86 commit 181b439
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hist/hist/src/TH2Poly.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ Double_t TH2Poly::GetBinError(Int_t bin) const
/// it should be the size of the bin list
Int_t TH2Poly::GetNumberOfBins() const {
Int_t nbins = fNcells-kNOverflow;
if (nbins != fBins->GetSize())
if (nbins != (fBins ? fBins->GetSize() : 0))
Fatal("GetNumberOfBins","Object has an invalid number of bins");
return nbins;
}
Expand Down

0 comments on commit 181b439

Please sign in to comment.