[Discovery]: Fix crash (#720)

This commit is contained in:
Edo 2023-01-14 15:38:26 +00:00 committed by GitHub
parent 0d96a0882b
commit f34377b456
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,8 @@ namespace Components
IsTerminating = false; IsTerminating = false;
Thread = std::thread([] Thread = std::thread([]
{ {
Com_InitThreadData();
while (!IsTerminating) while (!IsTerminating)
{ {
if (IsPerforming) if (IsPerforming)
@ -49,7 +51,7 @@ namespace Components
IsPerforming = false; IsPerforming = false;
} }
std::this_thread::sleep_for(50ms); Game::Sys_Sleep(50);
} }
}); });