win32.c: fix function pointer

* win32/win32.c (rb_w32_set_thread_description): fix the condition
  if the API function pointer is found.
  [ruby-core:82494] [Bug #13845]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-08-28 23:25:56 +00:00
parent 9f675c5b0a
commit c5683c9a63

View File

@ -7868,7 +7868,7 @@ rb_w32_set_thread_description(HANDLE th, const WCHAR *name)
set_thread_description = (set_thread_description_func)
get_proc_address("kernel32", "SetThreadDescription", NULL);
}
if (set_thread_description != (set_thread_description_func)-1) {
if (set_thread_description) {
result = set_thread_description(th, name);
}
return result;