Skip to content

Commit

Permalink
Fix null pointer exception reported in #23
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Oct 18, 2022
1 parent 7ff63fb commit 9759885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/win/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2359,7 +2359,7 @@ static void fs__chmod(uv_fs_t* req) {
* We fix it by forcibly clearing some kind of cache by setting the security info with the
* old DACL, then attempting to read it in again.
*/
if (numOldEAs != pOldDACL->AceCount) {
if (pOldDACL != NULL && numOldEAs != pOldDACL->AceCount) {
if (ERROR_SUCCESS != SetNamedSecurityInfoW(
req->file.pathw,
SE_FILE_OBJECT,
Expand Down

0 comments on commit 9759885

Please sign in to comment.