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 @@ public static async Task<bool> WaitForDefinitions( float timeoutSeconds = 30 )
/// </summary>
public static InventoryDef FindDefinition( InventoryDefId defId )
{
if ( _defMap == null )
return null;
if ( _defMap.TryGetValue( defId, out var val ) )
return val;