mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 03:13:22 +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:
parent
b0958c8d41
commit
c14fe21219
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user