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:26:44 +0300 |
commit | 5ee4931fb60e965cff48fdc182c161807ce451fc (patch) | |
tree | 44f3921208c5fa73327a5acfd34aa0d5b762d46e | |
parent | 49fd99119d28b488e87a273c1723c7c9d2e7a950 (diff) |
Fix FindClose->closedir
-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 |