diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-04-09 14:31:49 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-09 14:44:24 -0600 |
commit | 1158bce840bbd76a297c4f5eefd19444584f6fcd (patch) | |
tree | 1b06a0d9b5b8ec4c3760b3572fe4fe96285d35a7 | |
parent | 31afa067800d048985deb9ebe45c9729dfd39a00 (diff) | |
download | mana-1158bce840bbd76a297c4f5eefd19444584f6fcd.tar.gz mana-1158bce840bbd76a297c4f5eefd19444584f6fcd.tar.bz2 mana-1158bce840bbd76a297c4f5eefd19444584f6fcd.tar.xz mana-1158bce840bbd76a297c4f5eefd19444584f6fcd.zip |
Remove a segfault when exiting the client
-rw-r--r-- | src/game.cpp | 3 | ||||
-rw-r--r-- | src/gui/popupmenu.cpp | 4 | ||||
-rw-r--r-- | src/main.cpp | 1 | ||||
-rw-r--r-- | src/net/tmwserv/generalhandler.cpp | 2 |
4 files changed, 3 insertions, 7 deletions
diff --git a/src/game.cpp b/src/game.cpp index 71e22dca..76d2d883 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -415,9 +415,6 @@ Game::Game(): Game::~Game() { Net::getGeneralHandler()->unload(); -#ifdef TMWSERV_SUPPORT - Net::clearHandlers(); -#endif destroyGuiWindows(); diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 00e71290..12531d89 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -36,10 +36,8 @@ #include "npc.h" #include "player_relations.h" +#include "net/adminhandler.h" #include "net/net.h" -#ifdef EATHENA_SUPPORT -#include "net/ea/adminhandler.h" -#endif #include "resources/itemdb.h" #include "resources/iteminfo.h" diff --git a/src/main.cpp b/src/main.cpp index 27e61f19..0ef7289a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1654,7 +1654,6 @@ int main(int argc, char *argv[]) delete setup; delete setupWindow; - Net::getGeneralHandler()->unload(); #ifdef TMWSERV_SUPPORT #else delete network; diff --git a/src/net/tmwserv/generalhandler.cpp b/src/net/tmwserv/generalhandler.cpp index 504af023..e9b06270 100644 --- a/src/net/tmwserv/generalhandler.cpp +++ b/src/net/tmwserv/generalhandler.cpp @@ -93,6 +93,8 @@ void GeneralHandler::load() void GeneralHandler::unload() { + Net::clearHandlers(); + if (accountServerConnection) accountServerConnection->disconnect(); if (gameServerConnection) |