fix for count == 0

This commit is contained in:
kamyker 2020-05-20 22:32:51 +02:00
parent 7e4f1400c3
commit a3bd199b11

View File

@ -228,11 +228,12 @@ namespace Steamworks.Ugc
.GetPageAsync( 1 ); .GetPageAsync( 1 );
if ( !file.HasValue ) return null; if ( !file.HasValue ) return null;
using ( file.Value )
{
if ( file.Value.ResultCount == 0 ) return null; if ( file.Value.ResultCount == 0 ) return null;
var item = file.Value.Entries.First(); return file.Value.Entries.First();
file.Value.Dispose(); }
return item;
} }
internal static Item From( SteamUGCDetails_t details ) internal static Item From( SteamUGCDetails_t details )