1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 01:06:01 +08:00

Avoid nullrefs on clearing graph

This commit is contained in:
Thor Brigsted 2022-11-22 10:41:13 +01:00
parent 7863679da6
commit dd62011cfb

View File

@ -47,7 +47,7 @@ namespace XNode {
public virtual void Clear() {
if (Application.isPlaying) {
for (int i = 0; i < nodes.Count; i++) {
Destroy(nodes[i]);
if (nodes[i] != null) Destroy(nodes[i]);
}
}
nodes.Clear();