Fix crash when creating threads with Thread_AutoRelease
Setting the Thread_AutoRelease flag (default when using IThreader::MakeThread) caused a use-after-free after running the thread body.
This commit is contained in:
parent
99c39b1d57
commit
3c30f7b971
@ -376,6 +376,7 @@ void CompatThread::Run()
|
|||||||
// There should be no handles outstanding, so it's safe to self-destruct.
|
// There should be no handles outstanding, so it's safe to self-destruct.
|
||||||
thread_->detach();
|
thread_->detach();
|
||||||
delete this;
|
delete this;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lock.lock();
|
lock.lock();
|
||||||
|
Loading…
Reference in New Issue
Block a user