Message ID | pull.1445.git.git.1675176581433.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 592bcab61b86dbbac6fd2366039b4837b306ed66 |
Headers | show |
Series | win32: check for NULL when creating thread | expand |
diff --git a/compat/winansi.c b/compat/winansi.c index 3abe8dd5a27..f83610f684d 100644 --- a/compat/winansi.c +++ b/compat/winansi.c @@ -644,7 +644,7 @@ void winansi_init(void) /* start console spool thread on the pipe's read end */ hthread = CreateThread(NULL, 0, console_thread, NULL, 0, NULL); - if (hthread == INVALID_HANDLE_VALUE) + if (!hthread) die_lasterr("CreateThread(console_thread) failed"); /* schedule cleanup routine */