diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c index 9ffba9592c..efa1b72d4e 100644 --- a/src/thread/SDL_thread.c +++ b/src/thread/SDL_thread.c @@ -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);