Fix (unreported) Broken `BLI_threadapi_exit()`.

Function would not clear the static scheduler pointer, which lead to
crash (mem use after free) when trying to re-init and use the task API
again. Should not happen in Blender itself, but could in other cases
(like some future gtests ;) ).
This commit is contained in:
Bastien Montagne 2019-06-04 23:20:22 +02:00
parent b640265f77
commit 30d9366d17
1 changed files with 1 additions and 0 deletions

View File

@ -161,6 +161,7 @@ void BLI_threadapi_exit(void)
{
if (task_scheduler) {
BLI_task_scheduler_free(task_scheduler);
task_scheduler = NULL;
}
BLI_spin_end(&_malloc_lock);
}