Browse Source

CVCMIServer: do not crash if port not specified

Arseniy Shestakov 9 years ago
parent
commit
ea65fb15c2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      server/CVCMIServer.cpp

+ 2 - 1
server/CVCMIServer.cpp

@@ -579,7 +579,8 @@ int main(int argc, char** argv)
 	logConfig.configureDefault();
 
 	handleCommandOptions(argc, argv);
-	port = cmdLineOptions["port"].as<int>();
+	if(cmdLineOptions.count("port"))
+		port = cmdLineOptions["port"].as<int>();
 	logNetwork->info("Port %d will be used.", port);
 
 	preinitDLL(console);