Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarPlayerInventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/game/StarPlayerInventory.cpp')
-rw-r--r--source/game/StarPlayerInventory.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/game/StarPlayerInventory.cpp b/source/game/StarPlayerInventory.cpp
index 8ae052c..7c4ca3e 100644
--- a/source/game/StarPlayerInventory.cpp
+++ b/source/game/StarPlayerInventory.cpp
@@ -539,7 +539,8 @@ void PlayerInventory::shiftSwap(InventorySlot const& slot) {
} else if (auto bs = slot.ptr<BagSlot>()) {
if (itemAllowedInBag(m_swapSlot, bs->first)) {
m_swapSlot = m_bags[bs->first]->swapItems(bs->second, m_swapSlot);
- swapCustomBarLinks(SwapSlot(), slot);
+ if (m_swapSlot && !m_swapSlot->empty())
+ swapCustomBarLinks(SwapSlot(), slot);
}
}