1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 02:22:56 +08:00

Fix a few potential crashes

This commit is contained in:
smoogipoo 2019-01-25 20:47:37 +09:00
parent e2891ab1e9
commit b3403c78da
2 changed files with 6 additions and 2 deletions

View File

@ -120,7 +120,11 @@ namespace osu.Game.Screens.Multi.Match
}
};
chat.Exit += this.Exit;
chat.Exit += () =>
{
if (this.IsCurrentScreen())
this.Exit();
};
}
[BackgroundDependencyLoader]

View File

@ -16,7 +16,7 @@ namespace osu.Game.Screens.Play
{
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap.Value);
protected new BackgroundScreenBeatmap Background => (BackgroundScreenBeatmap)base.Background;
protected new BackgroundScreenBeatmap Background => base.Background as BackgroundScreenBeatmap;
public override bool AllowBeatmapRulesetChange => false;