From 05e12c32e10f338e15286ea2e883945ce537b664 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Wed, 8 May 2019 13:01:28 +0100 Subject: [PATCH] OnInventoryUpdated passes the InventoryResult --- Facepunch.Steamworks/SteamInventory.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Facepunch.Steamworks/SteamInventory.cs b/Facepunch.Steamworks/SteamInventory.cs index 18d8a86..723dcad 100644 --- a/Facepunch.Steamworks/SteamInventory.cs +++ b/Facepunch.Steamworks/SteamInventory.cs @@ -45,10 +45,12 @@ private static void InventoryUpdated( SteamInventoryFullUpdate_t x ) var r = new InventoryResult( x.Handle, false ); Items = r.GetItems( false ); - OnInventoryUpdated?.Invoke( x.Handle ); + OnInventoryUpdated?.Invoke( r ); + + r.Dispose(); } - public static event Action OnInventoryUpdated; + public static event Action OnInventoryUpdated; public static event Action OnDefinitionsUpdated; public static event Action OnServerDefinitionsUpdated;