mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-24 13:45:37 +03:00
add null check so that InventoryDef.Properties no longer causes a NullReferenceException, and returns properties correctly.
This commit is contained in:
parent
d06054875a
commit
42667f8578
@ -95,7 +95,7 @@ public InventoryRecipe[] GetRecipes()
|
||||
/// </summary>
|
||||
public string GetProperty( string name )
|
||||
{
|
||||
if ( _properties!= null && _properties.TryGetValue( name, out string val ) )
|
||||
if (name != null && _properties!= null && _properties.TryGetValue( name, out string val ) )
|
||||
return val;
|
||||
|
||||
uint _ = (uint)Helpers.MaxStringSize;
|
||||
|
Loading…
Reference in New Issue
Block a user