Fixes https://github.com/libsdl-org/SDL/issues/15340 (cherry picked from commit 7f23f09ee80730225139d9f8b839abb6546d06c4)
@@ -411,7 +411,7 @@ SDL_Thread *SDL_CreateThreadWithPropertiesRuntime(SDL_PropertiesID props,
SDL_DestroySemaphore(thread->ready_sem);
SDL_free(thread->name);
SDL_free(thread);
- thread = NULL;
+ return NULL;
}
SDL_WaitSemaphore(thread->ready_sem);