diff --git a/PCK-Studio/Internal/SkinModelImporter.cs b/PCK-Studio/Internal/SkinModelImporter.cs index 75714c96..f95f2e28 100644 --- a/PCK-Studio/Internal/SkinModelImporter.cs +++ b/PCK-Studio/Internal/SkinModelImporter.cs @@ -473,6 +473,11 @@ namespace PckStudio.Internal private static Image FixTexture(Image texture, IEnumerable 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()