From 93fa101af833b4d91a57ab9f3ceb857b9837e845 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Mon, 22 Jul 2019 01:41:58 +0300 Subject: [PATCH] Multiple dynamicPortList IndexOutofRange fix. (#176) --- Scripts/Editor/NodeEditorGUILayout.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/Editor/NodeEditorGUILayout.cs b/Scripts/Editor/NodeEditorGUILayout.cs index cd4d320..7372508 100644 --- a/Scripts/Editor/NodeEditorGUILayout.cs +++ b/Scripts/Editor/NodeEditorGUILayout.cs @@ -293,7 +293,7 @@ namespace XNodeEditor { } } return new { index = -1, port = (XNode.NodePort) null }; - }); + }).Where(x => x.port != null); List dynamicPorts = indexedPorts.OrderBy(x => x.index).Select(x => x.port).ToList(); ReorderableList list = null; @@ -423,7 +423,7 @@ namespace XNodeEditor { } } return new { index = -1, port = (XNode.NodePort) null }; - }); + }).Where(x => x.port != null); dynamicPorts = indexedPorts.OrderBy(x => x.index).Select(x => x.port).ToList(); int index = rl.index; @@ -491,4 +491,4 @@ namespace XNodeEditor { return list; } } -} \ No newline at end of file +}