Merge pull request #28944 from bdach/mania-crash

Fix crash when adding mania notes right after changing timing point
This commit is contained in:
Dean Herbert 2024-07-19 16:58:54 +09:00 committed by GitHub
commit fb5a1ecb4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions

View File

@ -9,6 +9,7 @@
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
@ -405,5 +406,13 @@ public HitObjectCompositionTool CurrentTool
CommitIfPlacementActive();
}
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
if (Beatmap.IsNotNull())
Beatmap.HitObjectAdded -= hitObjectAdded;
}
}
}