Fixed: Prevent crash if no StartupVerify config

fix-media-player
Ulukyn 5 years ago
parent b5ffa8becd
commit 24d4fb8253

@ -161,8 +161,10 @@ CLoginStateMachine LoginSM;
bool CStartupHttpClient::connectToLogin()
{
return connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0))
&& verifyServer(ClientCfg.ConfigFile.getVar("StartupVerify").asBool(0));
bool checkConnect = connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0));
if (ClientCfg.ConfigFile.exists("StartupVerify"))
checkConnect = checkConnect && verifyServer(ClientCfg.ConfigFile.getVar("StartupVerify").asBool(0));
}
CStartupHttpClient HttpClient;

Loading…
Cancel
Save