mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Refrain from attempting to clear skin sources in disposal
`Drawable.Dispose` is usually in an asynchronous context (async disposals stuff) and therefore this could cause a "collection was modified; enumeration opeartion may not execute" exception.
This commit is contained in:
parent
680791301f
commit
2240e2c39c
@ -210,7 +210,8 @@ namespace osu.Game.Skinning
|
|||||||
if (fallbackSource != null)
|
if (fallbackSource != null)
|
||||||
fallbackSource.SourceChanged -= OnSourceChanged;
|
fallbackSource.SourceChanged -= OnSourceChanged;
|
||||||
|
|
||||||
SkinSources.Clear();
|
foreach (var source in SkinSources.OfType<ISkinSource>())
|
||||||
|
source.SourceChanged -= OnSourceChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class NoFallbackProxy : ISkinSource
|
private class NoFallbackProxy : ISkinSource
|
||||||
|
Loading…
Reference in New Issue
Block a user