From d07fba228b5251862ad670e1d4f079c9456fab4b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 20 Jan 2013 14:15:45 +0300 Subject: Fix crashes on closing client before entering game. --- src/client.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index e281ddced..3a2a5f493 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -777,6 +777,9 @@ void Client::gameClear() if (logger) logger->log1("Quitting2"); + delete mCurrentDialog; + mCurrentDialog = nullptr; + delete gui; gui = nullptr; @@ -2873,3 +2876,9 @@ void Client::logEvent(const SDL_Event &event) break; }; } + +void Client::windowRemoved(const Window *const window) +{ + if (instance()->mCurrentDialog == window) + instance()->mCurrentDialog = nullptr; +} -- cgit v1.2.3-60-g2f50