From fa2e37e90e59ef895ff4a50bcd32733197878df3 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Thu, 19 Feb 2015 16:26:57 +0000 Subject: [PATCH] Null pointer check when iterating on Sequence commands --- Assets/Fungus/FungusScript/Scripts/Sequence.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Fungus/FungusScript/Scripts/Sequence.cs b/Assets/Fungus/FungusScript/Scripts/Sequence.cs index ba55648f..f6847523 100644 --- a/Assets/Fungus/FungusScript/Scripts/Sequence.cs +++ b/Assets/Fungus/FungusScript/Scripts/Sequence.cs @@ -215,7 +215,10 @@ namespace Fungus List connectedSequences = new List(); foreach (Command command in commandList) { - command.GetConnectedSequences(ref connectedSequences); + if (command != null) + { + command.GetConnectedSequences(ref connectedSequences); + } } return connectedSequences; }