1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

CVCMIServer: do not crash if port not specified

This commit is contained in:
Arseniy Shestakov 2016-09-16 20:01:07 +03:00
parent 84137dcaa5
commit ea65fb15c2

View File

@ -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);