summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Serialization/KeybindConverter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework/Serialization/KeybindConverter.cs')
-rw-r--r--src/SMAPI/Framework/Serialization/KeybindConverter.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Serialization/KeybindConverter.cs b/src/SMAPI/Framework/Serialization/KeybindConverter.cs
index 539f1291..f7b8e67e 100644
--- a/src/SMAPI/Framework/Serialization/KeybindConverter.cs
+++ b/src/SMAPI/Framework/Serialization/KeybindConverter.cs
@@ -49,7 +49,10 @@ namespace StardewModdingAPI.Framework.Serialization
case JsonToken.String:
{
- string str = JToken.Load(reader).Value<string>();
+ string? str = JToken.Load(reader).Value<string>();
+
+ if (str is null)
+ return new Keybind(Array.Empty<SButton>());
if (objectType == typeof(Keybind))
{