mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 17:02:15 -07:00
add null check
This commit is contained in:
parent
3eea394236
commit
9371d6434b
1 changed files with 3 additions and 1 deletions
|
|
@ -341,7 +341,9 @@ void ArrowAttachItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
|||
if (targetItem && (targetItem != startItem)) {
|
||||
auto startCard = qgraphicsitem_cast<CardItem *>(startItem);
|
||||
auto targetCard = qgraphicsitem_cast<CardItem *>(targetItem);
|
||||
attachCards(startCard, targetCard);
|
||||
if (startCard && targetCard) {
|
||||
attachCards(startCard, targetCard);
|
||||
}
|
||||
}
|
||||
|
||||
delArrow();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue