Skip to content

Commit

Permalink
Use quick way to fix this issue.
Browse files Browse the repository at this point in the history
DI object might be null in the dispose method.

see:
- ppy/osu@b11ae1c
  • Loading branch information
andy840119 committed May 19, 2024
1 parent 2439543 commit 0099bf4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Caching;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Edit.Checks.Components;
Expand Down Expand Up @@ -182,6 +183,10 @@ protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);

// todo: not very sure
if (!editorBeatmap.IsNull())
return;

editorBeatmap.HitObjectAdded -= hitObjectAdded;
editorBeatmap.HitObjectRemoved -= hitObjectRemoved;
editorBeatmap.HitObjectUpdated -= hitObjectUpdated;
Expand Down

0 comments on commit 0099bf4

Please sign in to comment.