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

Merge pull request #18811 from peppy/fix-realm-migration-fuck

Fix collection modified during `BlockAllOperations` if any subscriptions have been established
This commit is contained in:
Dan Balasescu 2022-06-22 21:32:25 +09:00 committed by GitHub
commit e467751c95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -822,7 +822,7 @@ namespace osu.Game.Database
// Before disposing the update context, clean up all subscriptions.
// Note that in the case of realm notification subscriptions, this is not really required (they will be cleaned up by disposal).
// In the case of custom subscriptions, we want them to fire before the update realm is disposed in case they do any follow-up work.
foreach (var action in customSubscriptionsResetMap)
foreach (var action in customSubscriptionsResetMap.ToArray())
{
action.Value?.Dispose();
customSubscriptionsResetMap[action.Key] = null;