diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-16 16:26:44 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-16 16:26:44 +0100 |
commit | 5ee4931fb60e965cff48fdc182c161807ce451fc (patch) | |
tree | 44f3921208c5fa73327a5acfd34aa0d5b762d46e /src/skel/crossplatform.h | |
parent | Fix rare stream deadlock on Windows (diff) | |
download | re3-5ee4931fb60e965cff48fdc182c161807ce451fc.tar re3-5ee4931fb60e965cff48fdc182c161807ce451fc.tar.gz re3-5ee4931fb60e965cff48fdc182c161807ce451fc.tar.bz2 re3-5ee4931fb60e965cff48fdc182c161807ce451fc.tar.lz re3-5ee4931fb60e965cff48fdc182c161807ce451fc.tar.xz re3-5ee4931fb60e965cff48fdc182c161807ce451fc.tar.zst re3-5ee4931fb60e965cff48fdc182c161807ce451fc.zip |
Diffstat (limited to 'src/skel/crossplatform.h')
-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 e5f4c7ba..710a7702 100644 --- a/src/skel/crossplatform.h +++ b/src/skel/crossplatform.h @@ -132,7 +132,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 |