mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 04:43:22 +08:00
Fix PerformFromMenuRunner failing if CurrentScreen is null
This commit is contained in:
parent
575a00dd7d
commit
f9196ae976
@ -73,13 +73,16 @@ namespace osu.Game
|
|||||||
// find closest valid target
|
// find closest valid target
|
||||||
IScreen current = getCurrentScreen();
|
IScreen current = getCurrentScreen();
|
||||||
|
|
||||||
|
if (current == null)
|
||||||
|
return;
|
||||||
|
|
||||||
// a dialog may be blocking the execution for now.
|
// a dialog may be blocking the execution for now.
|
||||||
if (checkForDialog(current)) return;
|
if (checkForDialog(current)) return;
|
||||||
|
|
||||||
game?.CloseAllOverlays(false);
|
game?.CloseAllOverlays(false);
|
||||||
|
|
||||||
// we may already be at the target screen type.
|
// we may already be at the target screen type.
|
||||||
if (validScreens.Contains(getCurrentScreen().GetType()) && !beatmap.Disabled)
|
if (validScreens.Contains(current.GetType()) && !beatmap.Disabled)
|
||||||
{
|
{
|
||||||
complete();
|
complete();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user