add null check

This commit is contained in:
RickyRister 2026-01-20 19:58:12 -08:00
parent 28c39d7132
commit 1dee795553

View file

@ -204,6 +204,10 @@ shouldDestroyOnMove(const Server_Card *card, const Server_CardZone *startZone, c
static bool
shouldBeFaceDown(const MoveCardStruct &cardStruct, const Server_CardZone *startZone, const Server_CardZone *targetZone)
{
if (!targetZone) {
return false;
}
// being face-down only makes sense for public zones
if (targetZone->getType() != ServerInfo_Zone::PublicZone) {
return false;