mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 22:25:49 +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>
|
/// </summary>
|
||||||
public string GetProperty( string name )
|
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;
|
return val;
|
||||||
|
|
||||||
uint _ = (uint)Helpers.MaxStringSize;
|
uint _ = (uint)Helpers.MaxStringSize;
|
||||||
|
Loading…
Reference in New Issue
Block a user