mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 03:28:49 -07:00
Fix segfault when game is closed while card view window is open (#5507)
This commit is contained in:
parent
b004e91aa4
commit
aeb1b9fb4f
9 changed files with 26 additions and 40 deletions
|
|
@ -40,13 +40,17 @@ ZoneViewZone::ZoneViewZone(Player *_p,
|
|||
}
|
||||
}
|
||||
|
||||
ZoneViewZone::~ZoneViewZone()
|
||||
/**
|
||||
* Deletes this ZoneView and removes it from the origZone's views.
|
||||
* You should normally call this method instead of deleteLater()
|
||||
*/
|
||||
void ZoneViewZone::close()
|
||||
{
|
||||
emit beingDeleted();
|
||||
qDebug("ZoneViewZone destructor");
|
||||
emit closed();
|
||||
if (!(revealZone && !writeableRevealZone)) {
|
||||
origZone->getViews().removeOne(this);
|
||||
}
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
QRectF ZoneViewZone::boundingRect() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue