mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-30 21:32:08 +02:00
Cleaned up thread state handling and added thread object validation
This commit is contained in:
@@ -126,7 +126,7 @@ void SDL_SYS_WaitThread(SDL_Thread *thread)
|
||||
Detached threads can be waited on, but should NOT be cleaned manually
|
||||
as it would result in a fatal error.
|
||||
*/
|
||||
if (R_SUCCEEDED(res) && SDL_GetAtomicInt(&thread->state) != SDL_THREAD_STATE_DETACHED) {
|
||||
if (R_SUCCEEDED(res) && SDL_GetThreadState(thread) != SDL_THREAD_DETACHED) {
|
||||
threadFree(thread->handle);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user