mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 00:53:22 +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)
|
if (dialogOverlay == null || dialogOverlay.CurrentDialog is PromptForSaveDialog)
|
||||||
{
|
{
|
||||||
confirmExit();
|
confirmExit();
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isNewBeatmap || HasUnsavedChanges)
|
if (isNewBeatmap || HasUnsavedChanges)
|
||||||
{
|
{
|
||||||
dialogOverlay?.Push(new PromptForSaveDialog(confirmExit, confirmExitWithSave));
|
dialogOverlay?.Push(new PromptForSaveDialog(() =>
|
||||||
|
{
|
||||||
|
confirmExit();
|
||||||
|
this.Exit();
|
||||||
|
}, () =>
|
||||||
|
{
|
||||||
|
confirmExitWithSave();
|
||||||
|
this.Exit();
|
||||||
|
}));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -464,7 +473,6 @@ namespace osu.Game.Screens.Edit
|
|||||||
{
|
{
|
||||||
exitConfirmed = true;
|
exitConfirmed = true;
|
||||||
Save();
|
Save();
|
||||||
this.Exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void confirmExit()
|
private void confirmExit()
|
||||||
@ -483,7 +491,6 @@ namespace osu.Game.Screens.Edit
|
|||||||
}
|
}
|
||||||
|
|
||||||
exitConfirmed = true;
|
exitConfirmed = true;
|
||||||
this.Exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly Bindable<string> clipboard = new Bindable<string>();
|
private readonly Bindable<string> clipboard = new Bindable<string>();
|
||||||
|
Loading…
Reference in New Issue
Block a user