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; if ( error ) return;
var r = new Result( this, data.Handle ); var r = new Result( this, data.Handle );
if ( r.IsSuccess )
{
SerializedItems = r.Serialize();
SerializedExpireTime = DateTime.Now.Add( TimeSpan.FromMinutes( 60 ) );
SerializedItems = r.Serialize(); Items = r.Items;
SerializedExpireTime = DateTime.Now.Add( TimeSpan.FromMinutes( 60 ) );
Items = r.Items; //
// Tell everyone we've got new items!
//
OnUpdate?.Invoke();
}
r.Dispose(); r.Dispose();
r = null; r = null;
//
// Tell everyone we've got new items!
//
OnUpdate?.Invoke();
} }
public void Dispose() public void Dispose()