summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
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 40b30899..07bcd3f8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -159,6 +159,7 @@ extern Net::Connection *accountServerConnection;
#endif
Graphics *graphics;
+Game *game = 0;
unsigned char state;
std::string errorMessage;
@@ -910,7 +911,6 @@ int main(int argc, char *argv[])
// Needs to be created in main, as the updater uses it
guiPalette = new Palette;
- Game *game = NULL;
Window *currentDialog = NULL;
#ifdef TMWSERV_SUPPORT
QuitDialog* quitDialog = NULL;
@@ -1290,6 +1290,7 @@ int main(int argc, char *argv[])
game = new Game;
game->logic();
delete game;
+ game = 0;
state = STATE_EXIT;
@@ -1467,9 +1468,9 @@ int main(int argc, char *argv[])
desktop = NULL;
logger->log("State: GAME");
- game = new Game;
game->logic();
delete game;
+ game = 0;
state = STATE_EXIT;
break;