Skip to content

Commit 4c43478

Browse files
committed
add simple check when draing object
1 parent b2dfafb commit 4c43478

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/JSRootPainter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8337,7 +8337,7 @@
83378337
url = this.itemFullName(item, top);
83388338
var func = null;
83398339
if ('_kind' in item) draw_handle = JSROOT.getDrawHandle(item._kind);
8340-
8340+
83418341

83428342
if ('_doing_expand' in item) {
83438343
h_get = true;
@@ -9160,7 +9160,7 @@
91609160
* Draw object in specified HTML element with given draw options */
91619161

91629162
JSROOT.draw = function(divid, obj, opt) {
9163-
if (typeof obj != 'object') return null;
9163+
if ((obj==null) || (typeof obj != 'object')) return null;
91649164

91659165
var handle = null;
91669166
if ('_typename' in obj) handle = JSROOT.getDrawHandle("ROOT." + obj['_typename'], opt);

0 commit comments

Comments
 (0)