summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-23 21:49:42 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:16 +0300
commite8a4474319aca4a32869fa1ebb8b5ebbd98237f6 (patch)
tree889a347ac3fb3998566fe07d2c170ad5748aa1f3 /src/main.cpp
parent1a59946dd91a9de55f114413a520bf36204222ff (diff)
downloadplus-e8a4474319aca4a32869fa1ebb8b5ebbd98237f6.tar.gz
plus-e8a4474319aca4a32869fa1ebb8b5ebbd98237f6.tar.bz2
plus-e8a4474319aca4a32869fa1ebb8b5ebbd98237f6.tar.xz
plus-e8a4474319aca4a32869fa1ebb8b5ebbd98237f6.zip
save Client object into global variable.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 7bedd1b9d..f367d80fa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -308,17 +308,21 @@ int main(int argc, char *argv[])
SetCurrentDirectory(PhysFs::getBaseDir());
#endif
setPriority(true);
- Client client(options);
+ client = new Client(options);
+ int ret = 0;
if (!options.testMode)
{
- client.gameInit();
- return client.gameExec();
+ client->gameInit();
+ ret = client->gameExec();
}
else
{
- client.testsInit();
- return client.testsExec();
+ client->testsInit();
+ ret = client->testsExec();
}
+ delete client;
+ client = nullptr;
+ return ret;
}
#else