diff --git a/Assets/Fungus/FungusScript/Editor/CommandListAdaptor.cs b/Assets/Fungus/FungusScript/Editor/CommandListAdaptor.cs index 6a3e4f17..e6a98f22 100644 --- a/Assets/Fungus/FungusScript/Editor/CommandListAdaptor.cs +++ b/Assets/Fungus/FungusScript/Editor/CommandListAdaptor.cs @@ -164,7 +164,16 @@ namespace Fungus bool isComment = command.GetType() == typeof(Comment); bool error = false; - string summary = command.GetSummary().Replace("\n", "").Replace("\r", ""); + string summary = command.GetSummary(); + if (summary == null) + { + summary = ""; + } + else + { + summary = summary.Replace("\n", "").Replace("\r", ""); + } + if (summary.Length > 80) { summary = summary.Substring(0, 80) + "...";