Fix segfault when game is closed while card view window is open (#5507)

This commit is contained in:
RickyRister 2025-01-20 19:06:55 -08:00 committed by GitHub
parent b004e91aa4
commit aeb1b9fb4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 26 additions and 40 deletions

View file

@ -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