FindDefinition return null if _defMap is null

This commit is contained in:
Garry Newman 2019-05-13 14:50:47 +01:00
parent fdee0bfc1e
commit 6981eb4a73

View File

@ -125,6 +125,9 @@ namespace Steamworks
/// </summary> /// </summary>
public static InventoryDef FindDefinition( InventoryDefId defId ) public static InventoryDef FindDefinition( InventoryDefId defId )
{ {
if ( _defMap == null )
return null;
if ( _defMap.TryGetValue( defId, out var val ) ) if ( _defMap.TryGetValue( defId, out var val ) )
return val; return val;