mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 23:12:56 +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:
commit
e467751c95
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user