Fix a crash

--HG--
branch : item_group
This commit is contained in:
Guillaume Dupuy 2017-03-09 20:52:02 +01:00
parent 6c9bbb8c0b
commit 54ff3a88d5

View file

@ -264,9 +264,10 @@ bool CItemGroupManager::moveGroup(std::string name, INVENTORIES::TInventory dst)
INVENTORIES::TInventory inventory = (INVENTORIES::TInventory)i;
if (inventory != dst && pIM->isInventoryAvailable(inventory))
{
for(auto &item : matchingItems(group, inventory))
{
//If an item is currently equipped, don't move it (or else crash !!)
if(pIM->isBagItemWeared(item.indexInBag)) continue;
CAHManager::getInstance()->runActionHandler("move_item", item.pCS, moveParams);
}