mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-06 03:18:14 +00:00
added a NULL check in UnloadDirectoryFiles
This commit is contained in:
@@ -2314,9 +2314,12 @@ FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool
|
|||||||
// WARNING: files.count is not reseted to 0 after unloading
|
// WARNING: files.count is not reseted to 0 after unloading
|
||||||
void UnloadDirectoryFiles(FilePathList files)
|
void UnloadDirectoryFiles(FilePathList files)
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < files.capacity; i++) RL_FREE(files.paths[i]);
|
if (files.paths != NULL)
|
||||||
|
{
|
||||||
|
for (unsigned int i = 0; i < files.capacity; i++) RL_FREE(files.paths[i]);
|
||||||
|
|
||||||
RL_FREE(files.paths);
|
RL_FREE(files.paths);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create directories (including full path requested), returns 0 on success
|
// Create directories (including full path requested), returns 0 on success
|
||||||
|
Reference in New Issue
Block a user