Only update Items if successful

This commit is contained in:
Garry Newman 2016-11-09 14:30:48 +00:00
parent 600c4c53c0
commit 9da329bb7d

View File

@ -56,20 +56,21 @@ namespace Facepunch.Steamworks
if ( error ) return;
var r = new Result( this, data.Handle );
if ( r.IsSuccess )
{
SerializedItems = r.Serialize();
SerializedExpireTime = DateTime.Now.Add( TimeSpan.FromMinutes( 60 ) );
Items = r.Items;
r.Dispose();
r = null;
//
// Tell everyone we've got new items!
//
OnUpdate?.Invoke();
}
r.Dispose();
r = null;
}
public void Dispose()