From bf3fe67862e3a42193f45c49d3d6b07724453da7 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 10 Jul 2015 22:04:06 +0200 Subject: Fix T45405: Crash on opening a file (in filebrowser code) Quoting Bastien from IRC: "Filebrowser is a nest of bad surprises" -- indeed :S --- source/blender/editors/space_file/file_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors') 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; -- cgit v1.2.3