1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-04 02:13:39 +08:00

Merge pull request #7424 from peppy/fix-changelog-overlay-nullref

Fix changelog overlay hard crashing on no internet connection
This commit is contained in:
Dan Balasescu
2020-01-03 14:32:30 +09:00
committed by GitHub
Unverified
+4 -3
View File
@@ -158,7 +158,8 @@ namespace osu.Game.Overlays
private Task initialFetchTask;
private void performAfterFetch(Action action) => fetchListing()?.ContinueWith(_ => Schedule(action));
private void performAfterFetch(Action action) => fetchListing()?.ContinueWith(_ =>
Schedule(action), TaskContinuationOptions.OnlyOnRanToCompletion);
private Task fetchListing()
{
@@ -185,10 +186,10 @@ namespace osu.Game.Overlays
tcs.SetResult(true);
});
req.Failure += _ =>
req.Failure += e =>
{
initialFetchTask = null;
tcs.SetResult(false);
tcs.SetException(e);
};
await API.PerformAsync(req);