From c2a9c7b2260a111f5c77307e591b18c0a8623cb6 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Sun, 14 Apr 2019 21:38:36 +0100 Subject: [PATCH] nullsafe invokes --- Facepunch.Steamworks/Redux/Apps.cs | 4 ++-- Facepunch.Steamworks/Redux/Utils.cs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Facepunch.Steamworks/Redux/Apps.cs b/Facepunch.Steamworks/Redux/Apps.cs index 052a3a8..eec2252 100644 --- a/Facepunch.Steamworks/Redux/Apps.cs +++ b/Facepunch.Steamworks/Redux/Apps.cs @@ -27,8 +27,8 @@ namespace Steamworks internal static void InstallEvents() { - new Event( x => OnDlcInstalled( x.AppID ) ); - new Event( x => OnNewLaunchParameters() ); + new Event( x => OnDlcInstalled?.Invoke( x.AppID ) ); + new Event( x => OnNewLaunchParameters?.Invoke() ); } /// diff --git a/Facepunch.Steamworks/Redux/Utils.cs b/Facepunch.Steamworks/Redux/Utils.cs index 35862ff..668c5aa 100644 --- a/Facepunch.Steamworks/Redux/Utils.cs +++ b/Facepunch.Steamworks/Redux/Utils.cs @@ -26,10 +26,10 @@ namespace Steamworks internal static void InstallEvents() { - new Event( x => OnIpCountryChanged() ); - new Event( x => OnLowBatteryPower( x.MinutesBatteryLeft ) ); - new Event( x => OnSteamShutdown() ); - new Event( x => OnGamepadTextInputDismissed( x.Submitted ) ); + new Event( x => OnIpCountryChanged?.Invoke() ); + new Event( x => OnLowBatteryPower?.Invoke( x.MinutesBatteryLeft ) ); + new Event( x => OnSteamShutdown?.Invoke() ); + new Event( x => OnGamepadTextInputDismissed?.Invoke( x.Submitted ) ); } ///