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);
|
||||
}
|
||||
}
|
||||
else {
|
||||
auto swapSlot = inventory->swapSlotItem();
|
||||
else if (auto swapSlot = inventory->swapSlotItem()) {
|
||||
if (auto es = slot.ptr<EquipmentSlot>()) {
|
||||
if (inventory->itemAllowedAsEquipment(swapSlot, *es))
|
||||
inventory->setItem(slot, swapSlot->take(1));
|
||||
|
Loading…
Reference in New Issue
Block a user