aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index a39b175a..f8ee18a6 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1976,9 +1976,13 @@ char **GetDirectoryFiles(const char *dirPath, int *fileCount)
// Clear directory files paths buffers
void ClearDirectoryFiles(void)
{
- for (int i = 0; i < MAX_DIRECTORY_FILES; i++) RL_FREE(dirFilesPath[i]);
+ if (dirFilesPath != NULL)
+ {
+ for (int i = 0; i < MAX_DIRECTORY_FILES; i++) RL_FREE(dirFilesPath[i]);
- RL_FREE(dirFilesPath);
+ RL_FREE(dirFilesPath);
+ }
+
dirFilesCount = 0;
}