fix a null reference exception

This commit is contained in:
Matthias Mailänder
2015-06-30 22:26:53 +02:00
parent 0492d57439
commit d6efab185d

View File

@@ -24,6 +24,9 @@ namespace OpenRA
public static bool TryParse(string s, out Hotkey result) public static bool TryParse(string s, out Hotkey result)
{ {
result = Invalid; result = Invalid;
if (string.IsNullOrWhiteSpace(s))
return false;
var parts = s.Split(' '); var parts = s.Split(' ');
Keycode key; Keycode key;