From 4a02c257ca06c97037b3d17774b32a4d308a9de6 Mon Sep 17 00:00:00 2001 From: iarspider Date: Wed, 4 Aug 2021 15:59:05 +0200 Subject: [PATCH] [GCC 11] Fix error "this pointer is null" in PhysicsTools/FWLite Code now matches the desctiption --- PhysicsTools/FWLite/interface/Scanner.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }