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:
parent
52cd906af6
commit
abf14f0982
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user