mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 17:53:15 +08:00
Make sure to dispose of the original texture upload as we are replacing it
This commit is contained in:
parent
598c6fcbad
commit
d000a4ed28
@ -247,6 +247,9 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
var image = Image.LoadPixelData(textureUpload.Data.ToArray(), textureUpload.Width, textureUpload.Height);
|
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(
|
image.Mutate(i => i.Resize(new Size(
|
||||||
Math.Min(textureUpload.Width, max_supported_texture_size),
|
Math.Min(textureUpload.Width, max_supported_texture_size),
|
||||||
Math.Min(textureUpload.Height, max_supported_texture_size)
|
Math.Min(textureUpload.Height, max_supported_texture_size)
|
||||||
|
Loading…
Reference in New Issue
Block a user