diff --git a/Assets/Fungus/Scripts/Components/Flowchart.cs b/Assets/Fungus/Scripts/Components/Flowchart.cs index 5fd99a6f..9dcb3b82 100644 --- a/Assets/Fungus/Scripts/Components/Flowchart.cs +++ b/Assets/Fungus/Scripts/Components/Flowchart.cs @@ -230,6 +230,9 @@ namespace Fungus // It shouldn't happen but it seemed to occur for a user on the forum variables.RemoveAll(item => item == null); + if (selectedBlocks == null) selectedBlocks = new List(); + if (selectedCommands == null) selectedCommands = new List(); + selectedBlocks.RemoveAll(item => item == null); selectedCommands.RemoveAll(item => item == null);