mirror of
https://github.com/ppy/osu
synced 2025-02-13 16:47:38 +00:00
Add missing lock coverage when using subscriptionActions
dictionary
This commit is contained in:
parent
297ffec359
commit
70a120ea8a
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user