1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 04:42:58 +08:00

Dispose ResourcesSkin before clearing skin sources

This commit is contained in:
Salman Ahmed 2021-06-26 12:23:05 +03:00
parent e5eea503db
commit e8e9fdd533

View File

@ -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)