mirror of
https://github.com/ppy/osu
synced 2025-01-25 07:13:22 +00:00
Unsubscribe from Completed event on old beatmap
This commit is contained in:
parent
3a2e0fbba5
commit
3af1aaeabe
@ -307,8 +307,11 @@ namespace osu.Game
|
||||
if (nextBeatmap?.Track != null)
|
||||
nextBeatmap.Track.Completed += currentTrackCompleted;
|
||||
|
||||
beatmap.OldValue?.Dispose();
|
||||
var oldBeatmap = beatmap.OldValue;
|
||||
if (oldBeatmap?.Track != null)
|
||||
oldBeatmap.Track.Completed -= currentTrackCompleted;
|
||||
|
||||
oldBeatmap?.Dispose();
|
||||
nextBeatmap?.LoadBeatmapAsync();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user