diff --git a/src/engine/objects/ItemBase.java b/src/engine/objects/ItemBase.java index e4776ceb..c5bdcc2c 100644 --- a/src/engine/objects/ItemBase.java +++ b/src/engine/objects/ItemBase.java @@ -80,24 +80,29 @@ public class ItemBase { this.twoHanded = (rs.getInt("twoHanded") == 1); - switch (ItemTemplate.itemTemplates.get(this.getUUID()).item_type) { - case RUNE: - case SCROLL: - case WAND: - case POTION: - case CHARTER: - case DEED: - case EMPLOYMENTCONTRACT: - case BUCKET: - case REALMCHARTER: - case TREASURE: - this.isConsumable = true; - break; - case OFFERING: - this.isConsumable = true; - Boon.HandleBoonListsForItemBase(uuid); - break; - } + ItemTemplate template = ItemTemplate.itemTemplates.get(this.getUUID()); + + if (template == null) + Logger.error(this.getUUID() + " null template"); + else + switch (ItemTemplate.itemTemplates.get(this.getUUID()).item_type) { + case RUNE: + case SCROLL: + case WAND: + case POTION: + case CHARTER: + case DEED: + case EMPLOYMENTCONTRACT: + case BUCKET: + case REALMCHARTER: + case TREASURE: + this.isConsumable = true; + break; + case OFFERING: + this.isConsumable = true; + Boon.HandleBoonListsForItemBase(uuid); + break; + } try { DbManager.ItemBaseQueries.LOAD_ANIMATIONS(this);