Skip to content

Commit

Permalink
win, tty: fix CreateFileW() return value check
Browse files Browse the repository at this point in the history
CreateFileW() returns INVALID_HANDLE_VALUE on failure, not NULL.

Fixes: libuv#2141
PR-URL: libuv#2142
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
bzoz authored and cjihrig committed Jan 14, 2019
1 parent d4288bb commit ec10a78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/win/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void uv_console_init(void) {
OPEN_EXISTING,
0,
0);
if (uv__tty_console_handle != NULL) {
if (uv__tty_console_handle != INVALID_HANDLE_VALUE) {
QueueUserWorkItem(uv__tty_console_resize_message_loop_thread,
NULL,
WT_EXECUTELONGFUNCTION);
Expand Down

0 comments on commit ec10a78

Please sign in to comment.