1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

#2646 add a null check if creature is empty

This commit is contained in:
Gwart 2023-09-02 16:21:54 +02:00
parent cab2bddf7e
commit 05ba56a873

View File

@ -748,6 +748,9 @@ void CExchangeController::moveStack(
SlotID sourceSlot)
{
auto creature = source->getCreature(sourceSlot);
if(creature == nullptr)
return;
SlotID targetSlot = target->getSlotFor(creature);
if(targetSlot.validSlot())