mirror of
https://github.com/osukey/osukey.git
synced 2025-05-31 02:17:34 +09:00
Fix preview track crashes
This commit is contained in:
parent
6dfab4d431
commit
db1a0ebb55
@ -138,6 +138,10 @@ namespace osu.Game.Overlays.BeatmapListing.Panels
|
||||
loading = true;
|
||||
|
||||
LoadComponentAsync(Preview = previewTrackManager.Get(beatmapSet), preview =>
|
||||
{
|
||||
// Make sure that we schedule to after the next audio frame to fix crashes in single-threaded execution.
|
||||
// See: https://github.com/ppy/osu-framework/issues/4692
|
||||
Schedule(() =>
|
||||
{
|
||||
// beatmapset may have changed.
|
||||
if (Preview != preview)
|
||||
@ -153,6 +157,7 @@ namespace osu.Game.Overlays.BeatmapListing.Panels
|
||||
if (playing.Value)
|
||||
attemptStart();
|
||||
});
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user