1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 20:22:55 +08:00

Lock unregistration for sanity

This commit is contained in:
Dean Herbert 2022-01-24 17:46:53 +09:00
parent 52cd906af6
commit abf14f0982

View File

@ -330,13 +330,16 @@ namespace osu.Game.Database
/// </summary> /// </summary>
private void unregisterAllSubscriptions() private void unregisterAllSubscriptions()
{ {
foreach (var action in realmSubscriptionsResetMap.Values) lock (contextLock)
action();
foreach (var action in customSubscriptionsResetMap)
{ {
action.Value?.Dispose(); foreach (var action in realmSubscriptionsResetMap.Values)
customSubscriptionsResetMap[action.Key] = null; action();
foreach (var action in customSubscriptionsResetMap)
{
action.Value?.Dispose();
customSubscriptionsResetMap[action.Key] = null;
}
} }
} }