mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
#2646 add a null check if creature is empty
This commit is contained in:
parent
64adb538fe
commit
707400d764
@ -749,6 +749,9 @@ void CExchangeController::moveStack(
|
|||||||
SlotID sourceSlot)
|
SlotID sourceSlot)
|
||||||
{
|
{
|
||||||
auto creature = source->getCreature(sourceSlot);
|
auto creature = source->getCreature(sourceSlot);
|
||||||
|
if(creature == nullptr)
|
||||||
|
return;
|
||||||
|
|
||||||
SlotID targetSlot = target->getSlotFor(creature);
|
SlotID targetSlot = target->getSlotFor(creature);
|
||||||
|
|
||||||
if(targetSlot.validSlot())
|
if(targetSlot.validSlot())
|
||||||
|
Loading…
Reference in New Issue
Block a user