diff --git a/src/resources/commands/callbacks/TransferItemCallback.java b/src/resources/commands/callbacks/TransferItemCallback.java index d19694b38..071ace392 100644 --- a/src/resources/commands/callbacks/TransferItemCallback.java +++ b/src/resources/commands/callbacks/TransferItemCallback.java @@ -31,6 +31,7 @@ package resources.commands.callbacks; import intents.chat.ChatBroadcastIntent; import resources.Race; import resources.commands.ICmdCallback; +import resources.control.Assert; import resources.objects.GameObjectType; import resources.objects.SWGObject; import resources.objects.creature.CreatureObject; @@ -88,6 +89,8 @@ public class TransferItemCallback implements ICmdCallback { SWGObject appearanceInventory = actor.getSlottedObject("appearance_inventory"); + Assert.notNull(appearanceInventory); + // TODO move check to CommandService. There's an in-combat boolean column in the command table! // You can't equip or unequip non-weapon equipment whilst in combat if (!weapon && actor.isInCombat() && ((newContainer.equals(actor) || oldContainer.equals(actor)) || (newContainer.equals(appearanceInventory) || oldContainer.equals(appearanceInventory)))) { @@ -102,7 +105,9 @@ public class TransferItemCallback implements ICmdCallback { } // We can't transfer an item into an appearance-equipped container! - if (newContainer.getParent().equals(appearanceInventory)) { + SWGObject containerParent = newContainer.getParent(); + + if (containerParent != null && containerParent.equals(appearanceInventory)) { // Don't be fooled - the message below contains no prose keys new ChatBroadcastIntent(player, "@container_error_message:container34_prose").broadcast(); return;