mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 06:52:55 +08:00
Merge pull request #10608 from peppy/fix-editor-bindable-crash
Fix editor crash on exit when forcing exit twice in a row
This commit is contained in:
commit
583ed29199
@ -450,12 +450,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -470,7 +479,6 @@ namespace osu.Game.Screens.Edit
|
|||||||
{
|
{
|
||||||
exitConfirmed = true;
|
exitConfirmed = true;
|
||||||
Save();
|
Save();
|
||||||
this.Exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void confirmExit()
|
private void confirmExit()
|
||||||
@ -489,7 +497,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