diff --git a/PhysicsTools/FWLite/interface/Scanner.h b/PhysicsTools/FWLite/interface/Scanner.h index ca9ee51f4fffc..c71a67d5ac72a 100644 --- a/PhysicsTools/FWLite/interface/Scanner.h +++ b/PhysicsTools/FWLite/interface/Scanner.h @@ -254,7 +254,7 @@ namespace fwlite { if (htemplate != nullptr) { if ((strcmp(hname, "htemp") == 0) && (strcmp(hname, htemplate->GetName()) != 0)) htempDelete(); - hist = (TH1 *)hist->Clone(hname); + hist = (TH1 *)htemplate->Clone(hname); } else if (drawopt.Contains("SAME", TString::kIgnoreCase)) { hist = getSameH1(hname); }