1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 23:43:03 +08:00

Make sure to dispose of the original texture upload as we are replacing it

This commit is contained in:
Dean Herbert 2023-01-24 15:56:10 +09:00
parent 598c6fcbad
commit d000a4ed28

View File

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