Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2015-05-15 00:58:08 +0300
committerJulian Eisel <eiseljulian@gmail.com>2015-05-15 02:08:41 +0300
commit7549ec7301cf051931878180eba52da16bc4c4ad (patch)
treea21a700ec2cd79eb9a2ebd61ea3cab0ec7672bab /source/blender/editors/space_file/filelist.c
parent3c10ec96b5ec1c705362ccdaeaac8007050d081f (diff)
Fix some issues found by Coverity Scan
Some of them are just brain dead code, some are potential bugs.
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r--source/blender/editors/space_file/filelist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 2853ee9c053..af65149ff9c 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1234,7 +1234,7 @@ static void filelist_from_main(struct FileList *filelist)
files = filelist->filelist;
- if (!filelist->filter_data.hide_parent) {
+ if (files && !filelist->filter_data.hide_parent) {
memset(&(filelist->filelist[0]), 0, sizeof(struct direntry));
filelist->filelist[0].relname = BLI_strdup(FILENAME_PARENT);
filelist->filelist[0].type |= S_IFDIR;
@@ -1246,7 +1246,7 @@ static void filelist_from_main(struct FileList *filelist)
for (id = lb->first; id; id = id->next) {
ok = 1;
if (ok) {
- if (!filelist->filter_data.hide_dot || id->name[2] != '.') {
+ if (files && (!filelist->filter_data.hide_dot || id->name[2] != '.')) {
memset(files, 0, sizeof(struct direntry));
if (id->lib == NULL) {
files->relname = BLI_strdup(id->name + 2);