diff --git a/OpenRA.Game/Translation.cs b/OpenRA.Game/Translation.cs index 60e9fecd5d..6a628a6262 100644 --- a/OpenRA.Game/Translation.cs +++ b/OpenRA.Game/Translation.cs @@ -88,6 +88,9 @@ namespace OpenRA public bool TryGetString(string key, out string value, IDictionary arguments = null) { + if (string.IsNullOrEmpty(key)) + throw new ArgumentException("A translation key must not be null or empty.", nameof(key)); + try { if (!HasMessage(key))