Fix error when joining exited threads

The internal thread handles were cleared prematurely when attempting to join them. The handles should be also cleared when trying to kill already exited threads.
This commit is contained in:
2023-01-29 21:25:29 +02:00
parent c1e0d70646
commit b0bc1fa310
6 changed files with 8 additions and 9 deletions

View File

@@ -149,8 +149,7 @@ void JobSystemService::Dispose()
{
if (Threads[i])
{
if (Threads[i]->IsRunning())
Threads[i]->Kill(true);
Threads[i]->Kill(true);
Delete(Threads[i]);
Threads[i] = nullptr;
}