diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-16 18:26:44 +0300 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-16 18:31:00 +0300 |
commit | 1bfd7c034553d29b4b345b3f082662aafb5b55ef (patch) | |
tree | f6bcc291bfe798b2e8d1f43a665d0027db631237 /src | |
parent | ee287f61202c1684af730daa283ae18068ec8864 (diff) |
Fix FindClose->closedir
Diffstat (limited to 'src')
-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 |