1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-28 06:52:55 +08:00

Add IsPresent check when dialog popping out

This commit is contained in:
Ganendra Afrasya 2019-11-12 20:48:26 +07:00
parent 574de39b0d
commit 8276428efc

View File

@ -241,7 +241,7 @@ namespace osu.Game.Overlays.Dialog
protected override void PopOut()
{
if (!actionInvoked)
if (!actionInvoked && content.IsPresent)
// In the case a user did not choose an action before a hide was triggered, press the last button.
// This is presumed to always be a sane default "cancel" action.
buttonsContainer.Last().Click();