[News] Add early termination support

This commit is contained in:
momo5502 2017-06-04 20:51:18 +02:00
parent 320d51ae32
commit 171cdcf0fd

View File

@ -230,15 +230,15 @@ namespace Components
News::Thread = std::thread([]() News::Thread = std::thread([]()
{ {
Changelog::LoadChangelog(); Changelog::LoadChangelog();
if (News::Terminate) return;
std::string data = Utils::Cache::GetFile("/iw4/motd.txt"); std::string data = Utils::Cache::GetFile("/iw4/motd.txt");
if (!data.empty()) if (!data.empty())
{ {
Localization::Set("MPUI_MOTD_TEXT", data); Localization::Set("MPUI_MOTD_TEXT", data);
} }
if (!Loader::PerformingUnitTests()) if (!Loader::PerformingUnitTests() && !News::Terminate)
{ {
News::GetLatestUpdater(); News::GetLatestUpdater();