mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-23 05:07:14 +00:00
SkinModelImporter - Add null check in 'FixTexture' function
This commit is contained in:
@@ -473,6 +473,11 @@ namespace PckStudio.Internal
|
||||
|
||||
private static Image FixTexture(Image texture, IEnumerable<Rectangle> areasToFix)
|
||||
{
|
||||
if (texture == null)
|
||||
{
|
||||
Trace.TraceError($"[{nameof(SkinModelImporter)}:{nameof(FixTexture)}] Failed to fix texture: texture is null.");
|
||||
return null;
|
||||
}
|
||||
Image result = new Bitmap(texture);
|
||||
using var g = Graphics.FromImage(result);
|
||||
g.ApplyConfig(new GraphicsConfig()
|
||||
|
||||
Reference in New Issue
Block a user