Selaa lähdekoodia

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

Dydzio 11 kuukautta sitten
vanhempi
sitoutus
e87ed1e80c
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      client/widgets/CExchangeController.cpp

+ 4 - 0
client/widgets/CExchangeController.cpp

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