diff --git a/Facepunch.Steamworks/ServerList/Base.cs b/Facepunch.Steamworks/ServerList/Base.cs index b119a1b..4c2fa5b 100644 --- a/Facepunch.Steamworks/ServerList/Base.cs +++ b/Facepunch.Steamworks/ServerList/Base.cs @@ -27,6 +27,11 @@ internal static ISteamMatchmakingServers Internal } } + internal static void Shutdown() + { + _internal = null; + } + #endregion @@ -85,6 +90,9 @@ public virtual async Task RunQueryAsync( float timeoutSeconds = 10 ) if ( request.Value == IntPtr.Zero || thisRequest.Value != request.Value ) return false; + if ( !SteamClient.IsValid ) + return false; + var r = Responsive.Count; UpdatePending(); diff --git a/Facepunch.Steamworks/SteamClient.cs b/Facepunch.Steamworks/SteamClient.cs index ec60c64..0c5488b 100644 --- a/Facepunch.Steamworks/SteamClient.cs +++ b/Facepunch.Steamworks/SteamClient.cs @@ -81,6 +81,7 @@ public static void Shutdown() SteamParties.Shutdown(); SteamNetworkingUtils.Shutdown(); SteamNetworkingSockets.Shutdown(); + ServerList.Base.Shutdown(); SteamAPI.Shutdown(); }