Skip to content

Commit 3cfdd33

Browse files
committed
additional check isDir assigned
1 parent 3a1ff54 commit 3cfdd33

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libraries/FS/src/vfs_api.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,9 @@ String VFSFileImpl::getNextFileName(bool *isDir)
559559
}
560560
name += fname;
561561
// check entry is a directory
562-
*isDir = (file->d_type == DT_DIR);
562+
if(isDir) {
563+
*isDir = (file->d_type == DT_DIR);
564+
}
563565
return name;
564566
}
565567

0 commit comments

Comments
 (0)