From 35c3f55b03c09249ed242da2c28a84225bf494d5 Mon Sep 17 00:00:00 2001 From: RomanZanevski <92728725+RomanZanevski@users.noreply.github.com> Date: Mon, 21 Mar 2022 14:02:48 +0100 Subject: [PATCH] Connection point fix If you use additional connection points in your graph you will see the NullRefExeption and your group will not be able to capture nodes inside, because of connection point(it's the same node with null type). This small fix add ability to capture graphs with connection points. --- Runtime/NodeGroup.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Runtime/NodeGroup.cs b/Runtime/NodeGroup.cs index 05138dc..1f681e6 100644 --- a/Runtime/NodeGroup.cs +++ b/Runtime/NodeGroup.cs @@ -19,6 +19,7 @@ namespace XNode.NodeGroups { List result = new List(); foreach (Node node in graph.nodes) { if (node == this) continue; + if (node == null) continue; if (node.position.x < this.position.x) continue; if (node.position.y < this.position.y) continue; if (node.position.x > this.position.x + width) continue; @@ -28,4 +29,4 @@ namespace XNode.NodeGroups { return result; } } -} \ No newline at end of file +}