summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-04-03 17:40:00 -0600
committerJared Adams <jaxad0127@gmail.com>2010-04-03 17:45:44 -0600
commitadae511e08f2c473f738bbd00987fc3a1aad0123 (patch)
tree979e418068f02f761a08222092d478e0562cb82d /src/net
parent77a4c494ec2cbaf17a67024283012102aa4d0d52 (diff)
downloadmana-adae511e08f2c473f738bbd00987fc3a1aad0123.tar.gz
mana-adae511e08f2c473f738bbd00987fc3a1aad0123.tar.bz2
mana-adae511e08f2c473f738bbd00987fc3a1aad0123.tar.xz
mana-adae511e08f2c473f738bbd00987fc3a1aad0123.zip
Fix a crash after changing servers
Reviewed-by: Chuck Miller
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/generalhandler.cpp2
-rw-r--r--src/net/manaserv/generalhandler.cpp3
-rw-r--r--src/net/net.cpp1
3 files changed, 4 insertions, 2 deletions
diff --git a/src/net/ea/generalhandler.cpp b/src/net/ea/generalhandler.cpp
index 749c2409..6ff4accd 100644
--- a/src/net/ea/generalhandler.cpp
+++ b/src/net/ea/generalhandler.cpp
@@ -180,6 +180,8 @@ void GeneralHandler::reload()
mNetwork->disconnect();
static_cast<LoginHandler*>(mLoginHandler.get())->clearWorlds();
+ static_cast<CharServerHandler*>(mCharHandler.get())->setCharCreateDialog(0);
+ static_cast<CharServerHandler*>(mCharHandler.get())->setCharSelectDialog(0);
}
void GeneralHandler::unload()
diff --git a/src/net/manaserv/generalhandler.cpp b/src/net/manaserv/generalhandler.cpp
index f2f7d33b..6e1639af 100644
--- a/src/net/manaserv/generalhandler.cpp
+++ b/src/net/manaserv/generalhandler.cpp
@@ -122,7 +122,8 @@ void GeneralHandler::load()
void GeneralHandler::reload()
{
- // Nothing needed yet
+ static_cast<CharHandler*>(mCharHandler.get())->setCharCreateDialog(0);
+ static_cast<CharHandler*>(mCharHandler.get())->setCharSelectDialog(0);
}
void GeneralHandler::unload()
diff --git a/src/net/net.cpp b/src/net/net.cpp
index d613f4df..f7ab3897 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -133,7 +133,6 @@ void connectToServer(const ServerInfo &server)
}
if (networkType == server.type && getGeneralHandler() != NULL)
- //if (networkType != ServerInfo::UNKNOWN)
{
getGeneralHandler()->reload();
}