Skip to content

Commit

Permalink
Update InventoryDef.cs
Browse files Browse the repository at this point in the history
if (name != null && _properties!= null && _properties.TryGetValue( name, out string val ) )

Updated to alow for null values
  • Loading branch information
KalleGH authored Sep 2, 2024
1 parent eec3c05 commit 0c541c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Facepunch.Steamworks/Structs/InventoryDef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ 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 ) )
//if ( _properties!= null && _properties.TryGetValue( name, out string val ) )
return val;

uint _ = (uint)Helpers.MemoryBufferSize;
Expand Down

0 comments on commit 0c541c0

Please sign in to comment.