Skip to content

Commit 9647de4

Browse files
committed
prevent null destination
1 parent a40e8e9 commit 9647de4

File tree

1 file changed

+4
-1
lines changed
  • src/main/java/com/marginallyclever/nodegraphcore

1 file changed

+4
-1
lines changed

src/main/java/com/marginallyclever/nodegraphcore/Node.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,10 @@ public List<Node> getDownstreamNodes() {
335335
for(var v : ports) {
336336
if(v instanceof Output<?> k) {
337337
for( var to : k.getTo()) {
338-
downstreamNodes.add(to.getOtherNode(this));
338+
var destination = to.getOtherNode(this);
339+
if(destination!=null && !downstreamNodes.contains(destination)) {
340+
downstreamNodes.add(destination);
341+
}
339342
}
340343
}
341344
}

0 commit comments

Comments
 (0)