Skip to content

Commit

Permalink
SkinModelImporter - Fix exception thrown in 'FixTexture'
Browse files Browse the repository at this point in the history
  • Loading branch information
NessieHax committed Aug 16, 2024
1 parent 386a97c commit fb17251
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions PCK-Studio/Internal/SkinModelImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ private static Image FixTexture(Image texture, IEnumerable<Rectangle> areasToFix
Trace.TraceError($"[{nameof(SkinModelImporter)}:{nameof(FixTexture)}] Failed to fix texture: texture is null.");
return null;
}
areasToFix = areasToFix.Where(rect => rect.Size.Width > 0 && rect.Size.Height > 0);
Image result = new Bitmap(texture);
using var g = Graphics.FromImage(result);
g.ApplyConfig(new GraphicsConfig()
Expand Down

0 comments on commit fb17251

Please sign in to comment.