From e87ed1e80c1bd95622358f5ddddf41d1a6f4c334 Mon Sep 17 00:00:00 2001 From: Dydzio Date: Tue, 3 Dec 2024 21:03:25 +0100 Subject: [PATCH] Add extra clientside sanity check (should be there from thestart) --- client/widgets/CExchangeController.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/widgets/CExchangeController.cpp b/client/widgets/CExchangeController.cpp index 0b2c25683..eb640a46c 100644 --- a/client/widgets/CExchangeController.cpp +++ b/client/widgets/CExchangeController.cpp @@ -79,6 +79,10 @@ void CExchangeController::moveArmy(bool leftToRight, std::optional heldS }); heldSlot = weakestSlot->first; } + + if (source->getCreature(heldSlot.value()) == nullptr) + return; + LOCPLINT->cb->bulkMoveArmy(source->id, target->id, heldSlot.value()); }