Skip to content

Commit

Permalink
Protect in graph painter if pad not found
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Oct 18, 2023
1 parent f53b7f5 commit f2a8b70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/hist2d/TGraphPainter.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { gStyle, BIT, settings, create, createHistogram, setHistogramTitle, isFunc, isStr,
clTPaveStats, clTCutG, clTH1I, clTH2I, clTF1, clTF2, kNoZoom, kNoStats } from '../core.mjs';
clTPaveStats, clTCutG, clTH1I, clTH2I, clTF1, clTF2, clTPad, kNoZoom, kNoStats } from '../core.mjs';
import { select as d3_select } from '../d3.mjs';
import { DrawOptions, buildSvgCurve, makeTranslate, addHighlightStyle } from '../base/BasePainter.mjs';
import { ObjectPainter } from '../base/ObjectPainter.mjs';
Expand Down Expand Up @@ -443,7 +443,7 @@ class TGraphPainter extends ObjectPainter {

pmain = {
pad_layer: true,
pad: pp?.getRootPad(true),
pad: pp?.getRootPad(true) ?? create(clTPad),
pw: rect.width,
ph: rect.height,
fX1NDC: 0.1, fX2NDC: 0.9, fY1NDC: 0.1, fY2NDC: 0.9,
Expand Down

0 comments on commit f2a8b70

Please sign in to comment.