mirror of
https://github.com/ppy/osu
synced 2025-02-25 23:21:26 +00:00
Avoid background processing falling over is BeatmapSet
is null
See https://github.com/ppy/osu/issues/10458.
This commit is contained in:
parent
6ed5613c22
commit
0611a1ddc9
@ -3,7 +3,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@ -136,19 +135,13 @@ namespace osu.Game
|
||||
// of other possible ways), but for now avoid queueing if the user isn't logged in at startup.
|
||||
if (api.IsLoggedIn)
|
||||
{
|
||||
foreach (var b in r.All<BeatmapInfo>().Where(b => b.StarRating < 0 || (b.OnlineID > 0 && b.LastOnlineUpdate == null)))
|
||||
{
|
||||
Debug.Assert(b.BeatmapSet != null);
|
||||
beatmapSetIds.Add(b.BeatmapSet.ID);
|
||||
}
|
||||
foreach (var b in r.All<BeatmapInfo>().Where(b => (b.StarRating < 0 || (b.OnlineID > 0 && b.LastOnlineUpdate == null)) && b.BeatmapSet != null))
|
||||
beatmapSetIds.Add(b.BeatmapSet!.ID);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var b in r.All<BeatmapInfo>().Where(b => b.StarRating < 0))
|
||||
{
|
||||
Debug.Assert(b.BeatmapSet != null);
|
||||
beatmapSetIds.Add(b.BeatmapSet.ID);
|
||||
}
|
||||
foreach (var b in r.All<BeatmapInfo>().Where(b => b.StarRating < 0 && b.BeatmapSet != null))
|
||||
beatmapSetIds.Add(b.BeatmapSet!.ID);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user