diff --git a/OpenRA.Game/Graphics/SequenceProvider.cs b/OpenRA.Game/Graphics/SequenceProvider.cs index b8ace3a5ce..74c3a16cf3 100644 --- a/OpenRA.Game/Graphics/SequenceProvider.cs +++ b/OpenRA.Game/Graphics/SequenceProvider.cs @@ -59,6 +59,10 @@ namespace OpenRA.Graphics public static bool HasSequence(string unit, string seq) { + if (!units.ContainsKey(unit)) + throw new InvalidOperationException( + "Unit `{0}` does not have any sequences defined.".F(unit)); + return units[unit].ContainsKey(seq); } }