Skip to content

Commit aabeac8

Browse files
committed
Fix - prevent drawing of empty TGraph
1 parent 343a93c commit aabeac8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/hist2d/TGraphPainter.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,8 @@ class TGraphPainter extends ObjectPainter {
502502
* @desc Can be called several times */
503503
drawBins(funcs, options, draw_g, w, h, lineatt, fillatt, main_block) {
504504
const graph = this.getGraph();
505+
if (!graph?.fNpoints) return;
506+
505507
let excl_width = 0, drawbins = null;
506508

507509
if (main_block && lineatt.excl_side) {

0 commit comments

Comments
 (0)