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-07-10 23:04:06 +0300
committerJulian Eisel <eiseljulian@gmail.com>2015-07-10 23:09:14 +0300
commitbf3fe67862e3a42193f45c49d3d6b07724453da7 (patch)
tree6fd5806ffdd4e8eb92de7d4dc014c1883a1aa011 /source/blender/editors
parentf3d5af41725989506474fec32d093d8ecf06403a (diff)
Fix T45405: Crash on opening a file (in filebrowser code)
Quoting Bastien from IRC: "Filebrowser is a nest of bad surprises" -- indeed :S
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_file/file_draw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 6106b723e99..3c09800c310 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -157,7 +157,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
/* Text input fields for directory and file. */
if (available_w > 0) {
- const struct direntry *file = filelist_file(sfile->files, params->active_file);
+ const struct direntry *file = sfile->files ? filelist_file(sfile->files, params->active_file) : NULL;
int overwrite_alert = file_draw_check_exists(sfile);
const bool is_active_dir = file && file->path && BLI_is_dir(file->path);
char *dir_path = (is_active_dir && params->active_file > 0) ? file->path : params->dir;