Fix for InvetoryDef Properties

Otherwise we get error in `_properties[name] = vl;` as name is null. GetProperty(null) is called to get list of keys as string. I guess separate method would be cleaner but I'm keeping this example to minimum (or im too lazy).
This commit is contained in:
Kamil Szurant 2019-11-19 20:50:41 +01:00 committed by GitHub
parent f1fdf29124
commit 6587db5a9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,7 +102,10 @@ namespace Steamworks
if ( !SteamInventory.Internal.GetItemDefinitionProperty( Id, name, out var vl, ref _ ) )
return null;
if (name == null) //return keys string
return vl;
if ( _properties == null )
_properties = new Dictionary<string, string>();
@ -235,4 +238,4 @@ namespace Steamworks
}
}
}
}