check if the slots are available, to catch any unwanted exceptions (#56)

This commit is contained in:
inventivetalent
2018-11-19 17:09:01 +01:00
parent 4d3fee52d9
commit bb7e4e6bb9
3 changed files with 11864 additions and 12256 deletions

File diff suppressed because it is too large Load Diff

3980
build/litegraph.min.js vendored

File diff suppressed because it is too large Load Diff

View File

@@ -5804,6 +5804,7 @@ LGraphCanvas.prototype.drawConnections = function(ctx)
var start_slot = start_node.outputs[start_node_slot];
var end_slot = node.inputs[i];
if(!start_slot || !end_slot) continue;
var start_dir = start_slot.dir || (start_node.flags.horizontal ? LiteGraph.DOWN : LiteGraph.RIGHT);
var end_dir = end_slot.dir || (node.flags.horizontal ? LiteGraph.UP : LiteGraph.LEFT);