1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00

Add extra clientside sanity check (should be there from thestart)

This commit is contained in:
Dydzio 2024-12-03 21:03:25 +01:00
parent ceac0bc203
commit e87ed1e80c

View File

@ -79,6 +79,10 @@ void CExchangeController::moveArmy(bool leftToRight, std::optional<SlotID> heldS
}); });
heldSlot = weakestSlot->first; heldSlot = weakestSlot->first;
} }
if (source->getCreature(heldSlot.value()) == nullptr)
return;
LOCPLINT->cb->bulkMoveArmy(source->id, target->id, heldSlot.value()); LOCPLINT->cb->bulkMoveArmy(source->id, target->id, heldSlot.value());
} }