1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-17 22:17:25 +08:00

Fix breadcrumbs crash when last screen exits

This commit is contained in:
smoogipoo 2019-01-25 19:31:52 +09:00
parent da135346b2
commit 3fb17ead06

View File

@ -30,7 +30,9 @@ namespace osu.Game.Graphics.UserInterface
private void onExited(IScreen lastScreen, IScreen newScreen)
{
Current.Value = newScreen;
if (newScreen != null)
Current.Value = newScreen;
Items.ToList().SkipWhile(s => s != Current.Value).Skip(1).ForEach(RemoveItem);
}
}