Send unsubscribe actions to synchronization context for consistency and safety

This commit is contained in:
Dean Herbert 2022-01-26 15:24:53 +09:00
parent 4fe3d83fc4
commit 5ea781faef

View File

@ -300,7 +300,7 @@ namespace osu.Game.Database
return new InvokeOnDisposal(() =>
{
if (ThreadSafety.IsUpdateThread)
unsubscribe();
syncContext.Send(_ => unsubscribe(), null);
else
syncContext.Post(_ => unsubscribe(), null);