See cms-sw/cmssw#41932 (comment)
// This produces errors
TH2Poly p1;
TH2Poly p2(p1);
The stack trace is:
* frame #0: 0x000000010515b3d4 libHist.so`TH2Poly::Copy(this=0x00000001000100a8, newobj=0x00000001000180a8) const at TH2Poly.cxx:235:49
frame #1: 0x000000010515add8 libHist.so`TH2Poly::TH2Poly(this=0x00000001000180a8, rhs=0x00000001000100a8) at TH2Poly.cxx:185:9
frame #2: 0x000000010515ae34 libHist.so`TH2Poly::TH2Poly(this=0x00000001000180a8, rhs=0x00000001000100a8) at TH2Poly.cxx:184:47
with a missing if not nullptr at:
234 // need to use Clone to copy the contained bin list
-> 235 newth2p.fBins = dynamic_cast<TList *>(fBins->Clone());
As a side note:
// This works fine (initialized case)
TH2Poly p1;
Double_t x[] = {0,0,1,1};
Double_t y[] = {0,1,1,0};
p1.AddBin(4, x, y);
TH2Poly p2(p1);
See cms-sw/cmssw#41932 (comment)
The stack trace is:
with a missing
if not nullptrat:As a side note: