check that target card is in play before attaching (#5275)

This commit is contained in:
RickyRister 2024-12-19 15:55:04 -08:00 committed by GitHub
parent d196988cab
commit 3514699f5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -309,8 +309,8 @@ void ArrowAttachItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
void ArrowAttachItem::attachCards(CardItem *startCard, const CardItem *targetCard)
{
// do nothing if target is already attached to another card
if (targetCard->getAttachedTo()) {
// do nothing if target is already attached to another card or is not in play
if (targetCard->getAttachedTo() || targetCard->getZone()->getName() != "table") {
return;
}