mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 00:53:22 +08:00
Schedule API callback to own scheduler
Fixes race condition when API returns a failure after exiting song select. Note that the API does also schedule to the correct thread, but this schedule ensures the callback is never run, which is what we want in this case.
This commit is contained in:
parent
d441a7a6f9
commit
31bfa00d60
@ -86,7 +86,7 @@ namespace osu.Game.Screens.Select
|
|||||||
requestedBeatmap.Metrics = res;
|
requestedBeatmap.Metrics = res;
|
||||||
Schedule(() => updateMetrics(res));
|
Schedule(() => updateMetrics(res));
|
||||||
};
|
};
|
||||||
lookup.Failure += e => updateMetrics(null);
|
lookup.Failure += e => Schedule(() => updateMetrics(null));
|
||||||
|
|
||||||
api.Queue(lookup);
|
api.Queue(lookup);
|
||||||
loading.Show();
|
loading.Show();
|
||||||
|
Loading…
Reference in New Issue
Block a user