diff options
Diffstat (limited to 'src/skel')
-rw-r--r-- | src/skel/crossplatform.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h index 6ea5b11e..9b43bcaf 100644 --- a/src/skel/crossplatform.h +++ b/src/skel/crossplatform.h @@ -136,7 +136,12 @@ void GetLocalTime_CP(SYSTEMTIME* out); typedef void* HANDLE; #define INVALID_HANDLE_VALUE NULL -#define FindClose(h) closedir((DIR*)h) +#define FindClose(h) \ + do { \ + if (h != nil) \ + closedir((DIR*)h); \ + } while(0) + #define LOCALE_USER_DEFAULT 0 #define DATE_SHORTDATE 0 |