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>
private void unregisterAllSubscriptions()
{
foreach (var action in realmSubscriptionsResetMap.Values)
action();
foreach (var action in customSubscriptionsResetMap)
lock (contextLock)
{
action.Value?.Dispose();
customSubscriptionsResetMap[action.Key] = null;
foreach (var action in realmSubscriptionsResetMap.Values)
action();
foreach (var action in customSubscriptionsResetMap)
{
action.Value?.Dispose();
customSubscriptionsResetMap[action.Key] = null;
}
}
}