diff --git a/GK6X/KeyboardState.cs b/GK6X/KeyboardState.cs index a124d75..8ce5bd9 100644 --- a/GK6X/KeyboardState.cs +++ b/GK6X/KeyboardState.cs @@ -243,6 +243,11 @@ private void LoadKeys() if (File.Exists(keysPath)) { List deviceKeys = Json.Deserialize(File.ReadAllText(keysPath)) as List; + if (deviceKeys == null) + { + Debug.WriteLine("[WARNING] Failed to parse json '" + keysPath + "'"); + return; + } foreach (object deviceKeyObj in deviceKeys) { Dictionary deviceKey = deviceKeyObj as Dictionary;