From bdbb287f00669ff47b4b5dc0949d15cea009db9b Mon Sep 17 00:00:00 2001 From: Simon Rodriguez Date: Wed, 2 Nov 2022 09:11:27 +0100 Subject: [PATCH] use array instead of list in a enumeration we wont change --- Scripts/NodeDataCache.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/NodeDataCache.cs b/Scripts/NodeDataCache.cs index 772478b..966b18f 100644 --- a/Scripts/NodeDataCache.cs +++ b/Scripts/NodeDataCache.cs @@ -46,7 +46,7 @@ namespace XNode { // Cleanup port dict - Remove nonexisting static ports - update static port types // AND update dynamic ports (albeit only those in lists) too, in order to enforce proper serialisation. // Loop through current node ports - foreach (NodePort port in ports.Values.ToList()) { + foreach (NodePort port in ports.Values.ToArray()) { // If port still exists, check it it has been changed NodePort staticPort; if (staticPorts.TryGetValue(port.fieldName, out staticPort)) {