1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 15:27:26 +08:00

Merge pull request #838 from MrTheMake/playsongselect-exit-fix

Unregister OnBeatmapChanged() when exiting song selection
This commit is contained in:
Dean Herbert 2017-05-31 11:31:12 +09:00 committed by GitHub
commit 9a40470298

View File

@ -131,7 +131,15 @@ namespace osu.Game.Screens
Background.Exit();
}
return base.OnExiting(next);
if (base.OnExiting(next))
return true;
// while this is not necessary as we are constructing our own bindable, there are cases where
// the GC doesn't run as fast as expected and this is triggered post-exit.
// added to resolve https://github.com/ppy/osu/issues/829
beatmap.ValueChanged -= OnBeatmapChanged;
return false;
}
}
}