From 6981eb4a739515533dbf65b9ea23e61b6235b2c0 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Mon, 13 May 2019 14:50:47 +0100 Subject: [PATCH] FindDefinition return null if _defMap is null --- Facepunch.Steamworks/SteamInventory.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Facepunch.Steamworks/SteamInventory.cs b/Facepunch.Steamworks/SteamInventory.cs index e6a1a6b..8d0b634 100644 --- a/Facepunch.Steamworks/SteamInventory.cs +++ b/Facepunch.Steamworks/SteamInventory.cs @@ -125,6 +125,9 @@ namespace Steamworks /// public static InventoryDef FindDefinition( InventoryDefId defId ) { + if ( _defMap == null ) + return null; + if ( _defMap.TryGetValue( defId, out var val ) ) return val;