From 3514699f5b7d50431a85ddb3d9bdf96ef88a34a9 Mon Sep 17 00:00:00 2001 From: RickyRister <42636155+RickyRister@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:55:04 -0800 Subject: [PATCH] check that target card is in play before attaching (#5275) --- cockatrice/src/game/board/arrow_item.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/game/board/arrow_item.cpp b/cockatrice/src/game/board/arrow_item.cpp index 5123dff32..cfc140d58 100644 --- a/cockatrice/src/game/board/arrow_item.cpp +++ b/cockatrice/src/game/board/arrow_item.cpp @@ -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; }