From 99fb86878e42a75d162a2742b45f3c6f9779f79b Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Wed, 6 Oct 2021 18:31:56 +0900 Subject: [PATCH] Only detach filter on disposal if attached --- osu.Game/Audio/Effects/Filter.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Audio/Effects/Filter.cs b/osu.Game/Audio/Effects/Filter.cs index 2036851cad..428a69bb19 100644 --- a/osu.Game/Audio/Effects/Filter.cs +++ b/osu.Game/Audio/Effects/Filter.cs @@ -118,7 +118,9 @@ namespace osu.Game.Audio.Effects protected override void Dispose(bool isDisposing) { base.Dispose(isDisposing); - detachFilter(); + + if (mixer.Effects.Contains(filter)) + detachFilter(); } } }