diff --git a/source/frontend/StarInventory.cpp b/source/frontend/StarInventory.cpp index bf9d0fb..b73b33e 100644 --- a/source/frontend/StarInventory.cpp +++ b/source/frontend/StarInventory.cpp @@ -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()) { if (inventory->itemAllowedAsEquipment(swapSlot, *es)) inventory->setItem(slot, swapSlot->take(1));