Fixed crash if SDL_SYS_CreateThread() fails (thanks @capehill!)

Fixes https://github.com/libsdl-org/SDL/issues/15340
This commit is contained in:
Sam Lantinga
2026-04-07 12:22:33 -07:00
parent f61a22e10f
commit 7f23f09ee8

View File

@@ -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);