mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
check for null zone during card item teardown
Took 1 hour 32 minutes Took 24 seconds
This commit is contained in:
parent
aff775f488
commit
184901c19c
1 changed files with 7 additions and 1 deletions
|
|
@ -191,7 +191,13 @@ void CardItem::setAttachedTo(CardItem *_attachedTo)
|
|||
attachedTo->getZone()->reorganizeCards();
|
||||
}
|
||||
} else {
|
||||
emit zone->cardAdded(this);
|
||||
// If the zone is being torn down, it might already be null by the time a card tries to re-attach all its
|
||||
// attached cards
|
||||
if (zone == nullptr) {
|
||||
deleteLater();
|
||||
} else {
|
||||
emit zone->cardAdded(this);
|
||||
}
|
||||
}
|
||||
|
||||
if (zone != nullptr) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue