From 1ddf1c5051253b8d1ed72a97fb0256dc6e109c4b Mon Sep 17 00:00:00 2001 From: OMGeeky <> Date: Thu, 17 Jul 2025 18:20:16 +0200 Subject: [PATCH] Add notification for error when opening SpritesheetEditor --- .../rpg/atcontentstudio/ui/sprites/SpritesheetEditor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/gpl/rpg/atcontentstudio/ui/sprites/SpritesheetEditor.java b/src/com/gpl/rpg/atcontentstudio/ui/sprites/SpritesheetEditor.java index a7cf830..0336a7b 100644 --- a/src/com/gpl/rpg/atcontentstudio/ui/sprites/SpritesheetEditor.java +++ b/src/com/gpl/rpg/atcontentstudio/ui/sprites/SpritesheetEditor.java @@ -53,9 +53,14 @@ public class SpritesheetEditor extends Editor { public SpritesheetEditor(Spritesheet sheet) { super(); - this.icon = new ImageIcon(sheet.getIcon(0)); this.name = sheet.id; this.target = sheet; + Image icon = sheet.getIcon(0); + if (icon == null) { + Notification.addError("Unable to open spritesheet " + sheet.id + " because the image is missing. This might be because its an UI spritesheet, which is not supported in ATCS"); + return; + } + this.icon = new ImageIcon(icon); JPanel pane = new JPanel();