e6e316977d
Almost all functions in the Windows API that open or create objects and return HANDLEs to them return null on failure; only a few (mostly to do with the file system) return INVALID_HANDLE_VALUE on failure. This PR scrubs the repo of a few, but not necessarily all, cases where INVALID_HANDLE_VALUE was mistakenly used or tested against instead of null. In particular, it fixes 2 cases reported in issue #427 where the return value of CreateThread() was compared against INVALID_HANDLE_VALUE against null, causing the error handling code to run at the wrong time. There are a lot of other uses of INVALID_HANDLE_VALUE I found that looked questionable, but which I left alone. Most of these were used to initialize HANDLE-typed variables and as a sentinel to see if those variables remained unset to a "real" value. Fixes #427 |
||
---|---|---|
.. | ||
lib | ||
tool | ||
dirs | ||
gdirenderer.hpp | ||
invalidate.cpp | ||
math.cpp | ||
paint.cpp | ||
precomp.cpp | ||
precomp.h | ||
sources.inc | ||
state.cpp |