diff --git a/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java b/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java index aa39ee1..87410af 100644 --- a/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java +++ b/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java @@ -333,6 +333,10 @@ public class NPC extends JSONElement { } if (this.icon_id != null) { String spritesheetId = this.icon_id.split(":")[0]; + if (proj.getSpritesheet(spritesheetId) == null) { + Notification.addError("Error Spritesheet "+id+". has no backlink."); + return; + } proj.getSpritesheet(spritesheetId).addBacklink(this); }