mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 17:32:54 +08:00
Fix editor crash on exit when forcing exit twice in a row
This commit is contained in:
parent
df5348cd93
commit
01b576c861
@ -444,12 +444,21 @@ namespace osu.Game.Screens.Edit
|
||||
if (dialogOverlay == null || dialogOverlay.CurrentDialog is PromptForSaveDialog)
|
||||
{
|
||||
confirmExit();
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isNewBeatmap || HasUnsavedChanges)
|
||||
{
|
||||
dialogOverlay?.Push(new PromptForSaveDialog(confirmExit, confirmExitWithSave));
|
||||
dialogOverlay?.Push(new PromptForSaveDialog(() =>
|
||||
{
|
||||
confirmExit();
|
||||
this.Exit();
|
||||
}, () =>
|
||||
{
|
||||
confirmExitWithSave();
|
||||
this.Exit();
|
||||
}));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -464,7 +473,6 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
exitConfirmed = true;
|
||||
Save();
|
||||
this.Exit();
|
||||
}
|
||||
|
||||
private void confirmExit()
|
||||
@ -483,7 +491,6 @@ namespace osu.Game.Screens.Edit
|
||||
}
|
||||
|
||||
exitConfirmed = true;
|
||||
this.Exit();
|
||||
}
|
||||
|
||||
private readonly Bindable<string> clipboard = new Bindable<string>();
|
||||
|
Loading…
Reference in New Issue
Block a user