From 91be60e10a00f37051b3121bad224440ec993f9f Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Wed, 3 Jul 2024 12:45:29 +0200 Subject: [PATCH] TextureAtlasEditor - Add error checking when getting color table --- PCK-Studio/Forms/Editor/TextureAtlasEditor.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PCK-Studio/Forms/Editor/TextureAtlasEditor.cs b/PCK-Studio/Forms/Editor/TextureAtlasEditor.cs index ea531c45..d36f07f7 100644 --- a/PCK-Studio/Forms/Editor/TextureAtlasEditor.cs +++ b/PCK-Studio/Forms/Editor/TextureAtlasEditor.cs @@ -105,7 +105,11 @@ namespace PckStudio.Forms.Editor { InitializeComponent(); - AcquireColorTable(pckFile); + if (!AcquireColorTable(pckFile)) + { + MessageBox.Show("Failed to acquire color information", "Acquire failure", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); + return; + } _atlasTexture = atlas; _tileAreaSize = resourceLocation.GetTileArea(atlas.Size);