mirror of
https://github.com/ppy/osu.git
synced 2026-05-26 06:09:53 +08:00
Add missing lock coverage when using subscriptionActions dictionary
This commit is contained in:
@@ -249,11 +249,13 @@ namespace osu.Game.Database
|
||||
|
||||
return new InvokeOnDisposal(() =>
|
||||
{
|
||||
// TODO: this likely needs to be run on the update thread.
|
||||
if (subscriptionActions.TryGetValue(action, out var unsubscriptionAction))
|
||||
lock (contextLock)
|
||||
{
|
||||
unsubscriptionAction?.Dispose();
|
||||
subscriptionActions.Remove(action);
|
||||
if (subscriptionActions.TryGetValue(action, out var unsubscriptionAction))
|
||||
{
|
||||
unsubscriptionAction?.Dispose();
|
||||
subscriptionActions.Remove(action);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user