1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-04 16:12:58 +08:00

Fix LCA call crashing in actual usage

It's not allowed to call `LoadComponentsAsync()` on a background thread:

	fd64f2f0d4/osu.Framework/Graphics/Containers/CompositeDrawable.cs (L147)

and in this case the event that causes the LCA call is dispatched from a
websocket client, which is not on the update thread, so scheduling is
required.
This commit is contained in:
Bartłomiej Dach 2024-11-28 11:19:00 +01:00
parent b0958c8d41
commit c14fe21219
No known key found for this signature in database

View File

@ -85,11 +85,11 @@ namespace osu.Game.Overlays
Logger.Log($"Queueing medal unlock for \"{medal.Name}\" ({queuedMedals.Count} to display)");
LoadComponentAsync(medalAnimation, m =>
Schedule(() => LoadComponentAsync(medalAnimation, m =>
{
queuedMedals.Enqueue(m);
showNextMedal();
});
}));
}
protected override bool OnClick(ClickEvent e)