1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-23 19:00:09 +08:00

Dispose ResourcesSkin before clearing skin sources

This commit is contained in:
Salman Ahmed
2021-06-26 12:23:05 +03:00
Unverified
parent e5eea503db
commit e8e9fdd533
@@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Audio;
@@ -72,6 +73,9 @@ namespace osu.Game.Skinning
protected virtual void UpdateSkins()
{
foreach (var resourcesSkin in SkinSources.OfType<ResourcesSkin>())
resourcesSkin.Dispose();
SkinSources.Clear();
foreach (var skin in skinSource.AllSources)