diff --git a/apps/openmw/mwworld/inventorystore.cpp b/apps/openmw/mwworld/inventorystore.cpp index 456c07202..f25a3edff 100644 --- a/apps/openmw/mwworld/inventorystore.cpp +++ b/apps/openmw/mwworld/inventorystore.cpp @@ -443,6 +443,9 @@ MWWorld::ContainerStoreIterator MWWorld::InventoryStore::unequipSlot(int slot, c { ContainerStoreIterator retval = it; + // empty this slot + mSlots[slot] = end(); + if (restack) { // restack item previously in this slot for (MWWorld::ContainerStoreIterator iter (begin()); iter != end(); ++iter) @@ -457,9 +460,6 @@ MWWorld::ContainerStoreIterator MWWorld::InventoryStore::unequipSlot(int slot, c } } - // empty this slot - mSlots[slot] = end(); - if (actor.getRefData().getHandle() == "player") { // Unset OnPCEquip Variable on item's script, if it has a script with that variable declared