mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-11 16:49:27 +01:00
Allow calling getFilesInDir with null files
This commit is contained in:
1 parent
8166e7a094
commit
da2b26299d
1 file changed
+4
-2
+4
-2
@@ -316,7 +316,8 @@ size_t getFilesInDir(const char *directory, std::vector<FileInfo> *files, const
|
||||
}
|
||||
}
|
||||
|
||||
files->push_back(info);
|
||||
if (files)
|
||||
files->push_back(info);
|
||||
#ifdef _WIN32
|
||||
} while (FindNextFile(hFind, &ffd) != 0);
|
||||
FindClose(hFind);
|
||||
@@ -324,7 +325,8 @@ size_t getFilesInDir(const char *directory, std::vector<FileInfo> *files, const
|
||||
}
|
||||
closedir(dirp);
|
||||
#endif
|
||||
std::sort(files->begin(), files->end());
|
||||
if (files)
|
||||
std::sort(files->begin(), files->end());
|
||||
return foundEntries;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user