R_PrintTextureDuplicates: always join thread

If the program exits without joining this thread, that's
a crash.
This commit is contained in:
James R 2024-02-26 20:54:08 -08:00
parent 1c63f98d61
commit 9d0e01b073

View file

@ -141,13 +141,16 @@ void R_CheckTextureDuplicates(INT32 start, INT32 end)
void R_PrintTextureDuplicates(void)
{
if (g_dups_thread.joinable())
{
g_dups_thread.join();
}
if (g_dups.empty())
{
return;
}
g_dups_thread.join();
for (auto [key, v] : g_dups)
{
std::for_each(v.cbegin(), v.cend(), print_dup);