Fix crash right clicking empty item slots with no swap item
This commit is contained in:
parent
f5c63fa189
commit
86f41b8450
@ -76,8 +76,7 @@ InventoryPane::InventoryPane(MainInterface* parent, PlayerPtr player, ContainerI
|
|||||||
inventory->setItem(slot, augmented);
|
inventory->setItem(slot, augmented);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else if (auto swapSlot = inventory->swapSlotItem()) {
|
||||||
auto swapSlot = inventory->swapSlotItem();
|
|
||||||
if (auto es = slot.ptr<EquipmentSlot>()) {
|
if (auto es = slot.ptr<EquipmentSlot>()) {
|
||||||
if (inventory->itemAllowedAsEquipment(swapSlot, *es))
|
if (inventory->itemAllowedAsEquipment(swapSlot, *es))
|
||||||
inventory->setItem(slot, swapSlot->take(1));
|
inventory->setItem(slot, swapSlot->take(1));
|
||||||
|
Loading…
Reference in New Issue
Block a user