From d6efab185d1493ae061f98bc8f0abcbfa9df7a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Tue, 30 Jun 2015 22:26:53 +0200 Subject: [PATCH] fix a null reference exception --- OpenRA.Game/Input/Hotkey.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Game/Input/Hotkey.cs b/OpenRA.Game/Input/Hotkey.cs index ea70df2e23..39782afe8d 100755 --- a/OpenRA.Game/Input/Hotkey.cs +++ b/OpenRA.Game/Input/Hotkey.cs @@ -24,6 +24,9 @@ namespace OpenRA public static bool TryParse(string s, out Hotkey result) { result = Invalid; + if (string.IsNullOrWhiteSpace(s)) + return false; + var parts = s.Split(' '); Keycode key;