diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index e5e1f6946e..e2f0f0c05b 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -756,12 +756,12 @@ namespace osu.Game private void showOverlayAboveOthers(OverlayContainer overlay, OverlayContainer[] otherOverlays) { + otherOverlays.Where(o => o != overlay).ForEach(o => o.Hide()); + // generally shouldn't ever hit this state, but protects against a crash on attempting to change ChildDepth. if (overlay.LoadState < LoadState.Ready) return; - otherOverlays.Where(o => o != overlay).ForEach(o => o.Hide()); - // show above others if not visible at all, else leave at current depth. if (!overlay.IsPresent) overlayContent.ChangeChildDepth(overlay, (float)-Clock.CurrentTime);