extra NULL check

It is undefined behavior what happens when you try to call pthread_join on a NULL thread (which will happen if you close the game before opening the save browser). Seems to be harmless, but make sure we don't do that just in case --jacob1
This commit is contained in:
SopaXorzTaker 2016-06-07 15:28:53 +03:00 committed by jacob1
parent c85ac21d84
commit 0af4b54bc3

View File

@ -38,6 +38,7 @@ void DownloadManager::Shutdown()
managerShutdown = true;
pthread_mutex_unlock(&downloadAddLock);
pthread_mutex_unlock(&downloadLock);
if (downloadThread)
pthread_join(downloadThread, NULL);
}