Merge pull request #8610 from Mailaender/hotkey-tryparse-nre

Fixed a possible NRE in Hotkey.TryParse
This commit is contained in:
Paul Chote
2015-07-03 17:10:55 +01:00

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;