1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-21 05:49:54 +08:00

Attempt to fix test failures

This commit is contained in:
Bartłomiej Dach
2024-11-28 10:24:56 +01:00
Unverified
parent bf29e3ae71
commit b0958c8d41
+4 -2
View File
@@ -144,10 +144,12 @@ namespace osu.Game.Overlays
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
// this event subscription fires async loads, which hard-fail if `CompositeDrawable.disposalCancellationSource` is canceled, which happens in the base call.
// therefore, unsubscribe from this event early to reduce the chances of a stray event firing at an inconvenient spot.
if (api.IsNotNull())
api.NotificationsClient.MessageReceived -= handleMedalMessages;
base.Dispose(isDisposing);
}
}
}