From 6ec0ab01cfb6335c457cfafddf874c6fa2c6c515 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 12 Jan 2016 22:31:06 +0100 Subject: [PATCH] Changed: Init CLoginProgressPostThread only if InstallStatsUrl is defined --HG-- branch : develop --- .../client/src/login_progress_post_thread.cpp | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/code/ryzom/client/src/login_progress_post_thread.cpp b/code/ryzom/client/src/login_progress_post_thread.cpp index 792ef3c04..14d300bcb 100644 --- a/code/ryzom/client/src/login_progress_post_thread.cpp +++ b/code/ryzom/client/src/login_progress_post_thread.cpp @@ -345,21 +345,20 @@ void CLoginProgressPostThread::init(NLMISC::CConfigFile &configFile) static std::string::size_type httpStrSize = httpStr.size(); std::string tmp = configFile.getVarPtr("InstallStatsUrl")->asString(0); std::string::size_type it= tmp.find(httpStr); - if (it != std::string::npos) - { - std::string::size_type hostPageSeparator = tmp.find("/", httpStrSize); - if (hostPageSeparator != std::string::npos) - { - installStartupPage = tmp.substr(hostPageSeparator); //keep the leading slash - installStartupHost = tmp.substr(httpStrSize, hostPageSeparator - httpStrSize); // dont keep the last slah - } - } + if (it == std::string::npos) return; + + std::string::size_type hostPageSeparator = tmp.find("/", httpStrSize); + if (hostPageSeparator == std::string::npos) return; + + installStartupPage = tmp.substr(hostPageSeparator); //keep the leading slash + installStartupHost = tmp.substr(httpStrSize, hostPageSeparator - httpStrSize); // dont keep the last slah + + init(installStartupHost, installStartupPage); } else { - nlwarning("Error the InstallStatsUrl is not in the client_default.cfg."); +// nlwarning("Error the InstallStatsUrl is not in the client_default.cfg."); } - init(installStartupHost, installStartupPage); }