mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Improve safety of FileChooserLabelledTextBox
disposal
This commit is contained in:
@ -11,6 +11,7 @@ using System.Threading.Tasks;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
|
using osu.Framework.Extensions.ObjectExtensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
@ -67,7 +68,9 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
game.UnregisterImportHandler(this);
|
|
||||||
|
if (game.IsNotNull())
|
||||||
|
game.UnregisterImportHandler(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Popover GetPopover() => new FileChooserPopover(handledExtensions, currentFile);
|
public override Popover GetPopover() => new FileChooserPopover(handledExtensions, currentFile);
|
||||||
|
Reference in New Issue
Block a user