summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-05-07 07:51:35 -0600
committerJared Adams <jaxad0127@gmail.com>2009-05-07 07:52:38 -0600
commitb6580a8e547732ec1194afe218c030b8230659e2 (patch)
treea1c2ae8454db1f91274c5c13e3d67d81343532c4 /src/main.cpp
parent67f53660db85c2f325472701517e04c446ec8ed4 (diff)
downloadmana-b6580a8e547732ec1194afe218c030b8230659e2.tar.gz
mana-b6580a8e547732ec1194afe218c030b8230659e2.tar.bz2
mana-b6580a8e547732ec1194afe218c030b8230659e2.tar.xz
mana-b6580a8e547732ec1194afe218c030b8230659e2.zip
Fix handling of error messages in the game state
Also make sure an appropirate message gets shown on duplicated login.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 0fa4044a..50ae193b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1011,7 +1011,7 @@ int main(int argc, char *argv[])
Net::getGeneralHandler()->tick();
- if (progressBar->isVisible())
+ if (progressBar && progressBar->isVisible())
{
progressBar->setProgress(progressBar->getProgress() + 0.005f);
if (progressBar->getProgress() == 1.0f)
@@ -1470,7 +1470,8 @@ int main(int argc, char *argv[])
game = new Game;
game->logic();
delete game;
- state = STATE_EXIT;
+ if (state != STATE_ERROR)
+ state = STATE_EXIT;
break;
case STATE_UPDATE: