diff --git a/graf2d/graf/src/TLegend.cxx b/graf2d/graf/src/TLegend.cxx index 848908537d524..adacc15c8edc0 100644 --- a/graf2d/graf/src/TLegend.cxx +++ b/graf2d/graf/src/TLegend.cxx @@ -809,14 +809,12 @@ void TLegend::PaintPrimitives() // bar are drawn differently. Int_t endcaps = 0; // no endcaps. if (eobj) { // eobj == nullptr for the legend header - TString eobjopt = eobj->GetDrawOption(); - eobjopt.ToLower(); - if (eobjopt.Contains("e1") && eobj->InheritsFrom(TH1::Class())) endcaps = 1; // a bar + if (opt.Contains("e1") && eobj->InheritsFrom(TH1::Class())) endcaps = 1; // a bar if (eobj->InheritsFrom(TGraph::Class())) { endcaps = 1; // a bar, default for TGraph - if (eobjopt.Contains("z")) endcaps = 0; // no endcaps. - if (eobjopt.Contains(">")) endcaps = 2; // empty arrow. - if (eobjopt.Contains("|>")) endcaps = 3; // filled arrow. + if (opt.Contains("z")) endcaps = 0; // no endcaps. + if (opt.Contains(">")) endcaps = 2; // empty arrow. + if (opt.Contains("|>")) endcaps = 3; // filled arrow. } } float arrow_shift = 0.3;