Browse Source

Ignore null commands in command list

Commands typically become null in the command list when there’s been a
change to a command script (e.g. upgrading to a new version of Fungus).
It’s better to just ignore this rather than cause a null exception.
master
chrisgregan 9 years ago
parent
commit
3de9f1eeb2
  1. 5
      Assets/Fungus/Flowchart/Scripts/Commands/If.cs

5
Assets/Fungus/Flowchart/Scripts/Commands/If.cs

@ -106,6 +106,11 @@ namespace Fungus
{
Command nextCommand = parentBlock.commandList[i];
if (nextCommand == null)
{
continue;
}
// Find next command at same indent level as this If command
// Skip disabled commands, comments & labels
if (!nextCommand.enabled ||

Loading…
Cancel
Save