diff --git a/osu.Game/Overlays/Dialog/PopupDialog.cs b/osu.Game/Overlays/Dialog/PopupDialog.cs index f5e6aed41b..6159ab59f0 100644 --- a/osu.Game/Overlays/Dialog/PopupDialog.cs +++ b/osu.Game/Overlays/Dialog/PopupDialog.cs @@ -87,12 +87,13 @@ namespace osu.Game.Overlays.Dialog { if (actionInvoked) return; + actionInvoked = true; + // Hide the dialog before running the action. // This is important as the code which is performed may check for a dialog being present (ie. `OsuGame.PerformFromScreen`) // and we don't want it to see the already dismissed dialog. Hide(); - actionInvoked = true; action?.Invoke(); }; }