[Orxonox-commit 754] r3283 - branches/netp6/src/orxonox/gamestates

rgrieder at orxonox.net rgrieder at orxonox.net
Mon Jul 13 16:59:10 CEST 2009


Author: rgrieder
Date: 2009-07-13 16:59:10 +0200 (Mon, 13 Jul 2009)
New Revision: 3283

Modified:
   branches/netp6/src/orxonox/gamestates/GSDedicated.cc
Log:
Fixed a bug that caused the game to crash at random locations when shutting it down.

Modified: branches/netp6/src/orxonox/gamestates/GSDedicated.cc
===================================================================
--- branches/netp6/src/orxonox/gamestates/GSDedicated.cc	2009-07-13 12:37:03 UTC (rev 3282)
+++ branches/netp6/src/orxonox/gamestates/GSDedicated.cc	2009-07-13 14:59:10 UTC (rev 3283)
@@ -84,8 +84,6 @@
 #endif
 
         this->server_ = new Server(CommandLine::getValue("port"));
-        if( this->commandLine_ )
-          delete[] this->commandLine_;
         COUT(0) << "Loading scene in server mode" << std::endl;
 
         server_->open();
@@ -103,9 +101,13 @@
         resetTerminalMode();
         delete this->originalTerminalSettings_;
 #endif
-        //inputThread_->join();
+        COUT(0) << "Press enter to end the game..." << std::endl;
+        inputThread_->join();
         delete this->inputThread_;
 
+        if (this->commandLine_ )
+          delete[] this->commandLine_;
+
         GameMode::setHasServer(false);
     }
 




More information about the Orxonox-commit mailing list