mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Merge pull request #2739 from Gwart/bugfix/#2646-hero-exchange-server-compliant
#2646 add a null check if creature is empty
This commit is contained in:
commit
244db2da33
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user