diff --git a/src/file_entry.cpp b/src/file_entry.cpp index 6083dec..84fa530 100644 --- a/src/file_entry.cpp +++ b/src/file_entry.cpp @@ -84,6 +84,9 @@ const vector> FileEntry::GetChilds() const FindClose(handle); #else DIR *handle = opendir(filePath.c_str()); + if (handle == nullptr) { + return children; + } struct dirent *entry; while ((entry = readdir(handle)) != nullptr) { string filename(entry->d_name);