mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-07 05:53:59 -07:00
add null check
This commit is contained in:
parent
28c39d7132
commit
1dee795553
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue