diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-06-13 13:16:16 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-06-13 13:16:16 -0600 |
commit | e8bea8a6edf69e824a922adeb5e697111ceabe90 (patch) | |
tree | db1937956bc585b300f2a2c8312af4ad5bf924de /src/client.cpp | |
parent | 593fd2b831304c8e421589aab0fb158e4b7e9c35 (diff) | |
parent | 0b15a3ad32838134384524ce4af95d65b0b4e5da (diff) | |
download | mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.tar.gz mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.tar.bz2 mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.tar.xz mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.zip |
Merge remote branch '1.0/1.0'
Conflicts:
data/graphics/CMakeLists.txt
data/graphics/Makefile.am
src/client.cpp
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/client.cpp b/src/client.cpp index 323d5b49..35292d22 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -433,6 +433,14 @@ Client::~Client() SDL_RemoveTimer(mLogicCounterId); SDL_RemoveTimer(mSecondsCounterId); + // Unload XML databases + ColorDB::unload(); + EmoteDB::unload(); + ItemDB::unload(); + MonsterDB::unload(); + NPCDB::unload(); + StatusEffect::unload(); + // Before config.write() since it writes the shortcuts to the config delete itemShortcut; delete emoteShortcut; @@ -586,19 +594,6 @@ int Client::exec() { delete game; game = 0; - - if (mState != STATE_CHANGE_MAP) - { - // Unload XML databases - ColorDB::unload(); - EmoteDB::unload(); - ItemDB::unload(); - MonsterDB::unload(); - NPCDB::unload(); - StatusEffect::unload(); - - ActorSprite::unload(); - } } mOldState = mState; @@ -973,6 +968,7 @@ int Client::exec() case STATE_ERROR: logger->log("State: ERROR"); + logger->log("Error: %s\n", errorMessage.c_str()); mCurrentDialog = new OkDialog(_("Error"), errorMessage); mCurrentDialog->addActionListener(&errorListener); mCurrentDialog = NULL; // OkDialog deletes itself @@ -1159,6 +1155,10 @@ void Client::initUpdatesDir() mUpdateHost = config.getValue("updatehost", ""); } + // Don't go out of range int he next check + if (mUpdateHost.length() < 2) + return; + // Remove any trailing slash at the end of the update host if (!mUpdateHost.empty() && mUpdateHost.at(mUpdateHost.size() - 1) == '/') mUpdateHost.resize(mUpdateHost.size() - 1); |