mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 00:12:15 -07:00
Comment.
Took 5 minutes
This commit is contained in:
parent
df6143c03a
commit
161661b781
1 changed files with 3 additions and 1 deletions
|
|
@ -185,6 +185,8 @@ void CardItem::setAttachedTo(CardItem *_attachedTo)
|
|||
gridPoint.setX(-1);
|
||||
attachedTo = _attachedTo;
|
||||
if (attachedTo != nullptr) {
|
||||
// If the zone is being torn down, it might already be null by the time a card tries to un-attach all its
|
||||
// attached cards
|
||||
if (attachedTo->zone == nullptr) {
|
||||
deleteLater();
|
||||
} else {
|
||||
|
|
@ -195,7 +197,7 @@ void CardItem::setAttachedTo(CardItem *_attachedTo)
|
|||
}
|
||||
}
|
||||
} else {
|
||||
// If the zone is being torn down, it might already be null by the time a card tries to re-attach all its
|
||||
// If the zone is being torn down, it might already be null by the time a card tries to un-attach all its
|
||||
// attached cards
|
||||
if (zone == nullptr) {
|
||||
deleteLater();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue