diff --git a/src/file_entry.cpp b/src/file_entry.cpp index 6083decf7e68280aaf0fa8f1337512fcb1bd8eae..84fa530f537bc7d32c79bff971307a3172fed00b 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);