Browse Source

Enforce Flowchart selectedBlocks and selectedCommands collections are not null

master
desktop-maesty/steve 6 years ago
parent
commit
206f5db892
  1. 3
      Assets/Fungus/Scripts/Components/Flowchart.cs

3
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<Block>();
if (selectedCommands == null) selectedCommands = new List<Command>();
selectedBlocks.RemoveAll(item => item == null);
selectedCommands.RemoveAll(item => item == null);

Loading…
Cancel
Save