diff options
Diffstat (limited to 'src/SMAPI.Mods.ErrorHandler/ModEntry.cs')
-rw-r--r-- | src/SMAPI.Mods.ErrorHandler/ModEntry.cs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/SMAPI.Mods.ErrorHandler/ModEntry.cs b/src/SMAPI.Mods.ErrorHandler/ModEntry.cs index fa171012..bfbfd2dc 100644 --- a/src/SMAPI.Mods.ErrorHandler/ModEntry.cs +++ b/src/SMAPI.Mods.ErrorHandler/ModEntry.cs @@ -1,5 +1,3 @@ -#nullable disable - using System; using System.Reflection; using StardewModdingAPI.Events; @@ -59,7 +57,7 @@ namespace StardewModdingAPI.Mods.ErrorHandler /// <summary>The method invoked when a save is loaded.</summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event arguments.</param> - private void OnSaveLoaded(object sender, SaveLoadedEventArgs e) + private void OnSaveLoaded(object? sender, SaveLoadedEventArgs e) { // show in-game warning for removed save content if (this.IsSaveContentRemoved) @@ -82,7 +80,7 @@ namespace StardewModdingAPI.Mods.ErrorHandler MethodInfo getMonitorForGame = coreType.GetMethod("GetMonitorForGame") ?? throw new InvalidOperationException("Can't access the SMAPI's 'GetMonitorForGame' method. This mod may not work correctly."); - return (IMonitor)getMonitorForGame.Invoke(core, Array.Empty<object>()) ?? this.Monitor; + return (IMonitor?)getMonitorForGame.Invoke(core, Array.Empty<object>()) ?? this.Monitor; } } } |