1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00

fix Disconnect bug

This commit is contained in:
mayuntian 2020-08-13 16:42:52 +08:00
parent eabdc6c61c
commit cc1ae37240

View File

@ -307,11 +307,7 @@ namespace XNode {
// Remove the other ports connection to this port
NodePort otherPort = connections[i].Port;
if (otherPort != null) {
for (int k = 0; k < otherPort.connections.Count; k++) {
if (otherPort.connections[k].Port == this) {
otherPort.connections.RemoveAt(i);
}
}
otherPort.connections.RemoveAll(it => { return it.Port == this; });
}
// Remove this ports connection to the other
connections.RemoveAt(i);