From d000a4ed28967ef7a40c541acb26df6969c82373 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 24 Jan 2023 15:56:10 +0900 Subject: [PATCH] Make sure to dispose of the original texture upload as we are replacing it --- osu.Game/Skinning/Skin.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/Skinning/Skin.cs b/osu.Game/Skinning/Skin.cs index 2761a93290..298a94920f 100644 --- a/osu.Game/Skinning/Skin.cs +++ b/osu.Game/Skinning/Skin.cs @@ -247,6 +247,9 @@ namespace osu.Game.Skinning { var image = Image.LoadPixelData(textureUpload.Data.ToArray(), textureUpload.Width, textureUpload.Height); + // The original texture upload will no longer be returned or used. + textureUpload.Dispose(); + image.Mutate(i => i.Resize(new Size( Math.Min(textureUpload.Width, max_supported_texture_size), Math.Min(textureUpload.Height, max_supported_texture_size)