diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2025-04-01 11:40:37 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2025-04-01 11:40:41 +0200 |
commit | ce60630c42e232bf81f22019e3499d6036a68f7e (patch) | |
tree | 08c7615faf264149229fbc681b708d5bd14d2259 /src/gui | |
parent | 1d41d71eff082bb3232962ac6c4c68051f771da0 (diff) | |
download | mana-ce60630c42e232bf81f22019e3499d6036a68f7e.tar.gz mana-ce60630c42e232bf81f22019e3499d6036a68f7e.tar.bz2 mana-ce60630c42e232bf81f22019e3499d6036a68f7e.tar.xz mana-ce60630c42e232bf81f22019e3499d6036a68f7e.zip |
Fixed crash on exit when CharCreateDialog is open
* Displayed Being was deleting its SpeechBubble after the
WindowContainer had already deleted it. Resolved by registering a
DeathListener.
* On dialog deletion, the CharHandler had become a roaming pointer but
was still accessed.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/charcreatedialog.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp index fb834933..d5bdf3ca 100644 --- a/src/gui/charcreatedialog.cpp +++ b/src/gui/charcreatedialog.cpp @@ -167,7 +167,8 @@ CharCreateDialog::~CharCreateDialog() delete mPlayer; // Make sure the char server handler knows that we're gone - Net::getCharHandler()->setCharCreateDialog(nullptr); + if (auto charHandler = Net::getCharHandler()) + charHandler->setCharCreateDialog(nullptr); } void CharCreateDialog::action(const gcn::ActionEvent &event) |