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:
authorCampbell Barton <ideasman42@gmail.com>2011-10-03 07:48:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-03 07:48:48 +0400
commitd1c99081ea57a9ef55d51dc08ddb700da5f6bbf8 (patch)
tree439387f05491fc6de5f68390e1ec0e90868da640 /source/blender/editors/space_file
parent8e55780aa75da5a8f93a927ab93f605d7c580625 (diff)
fix for crash when loading the file selector on startup.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/file_ops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index fd52c3c4199..c265c4ec1a7 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -1176,7 +1176,9 @@ int file_filename_exec(bContext *C, wmOperator *UNUSED(unused))
* until this is properly supported just disable it. */
static int file_directory_poll(bContext *C)
{
- return ED_operator_file_active(C) && filelist_lib(CTX_wm_space_file(C)->files) == NULL;
+ /* sfile->files can be NULL on file load */
+ SpaceFile *sfile= CTX_wm_space_file(C);
+ return ED_operator_file_active(C) && sfile->files && filelist_lib(sfile->files);
}
void FILE_OT_directory(struct wmOperatorType *ot)