diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-03 07:48:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-03 07:48:48 +0400 |
commit | d1c99081ea57a9ef55d51dc08ddb700da5f6bbf8 (patch) | |
tree | 439387f05491fc6de5f68390e1ec0e90868da640 /source/blender/editors/space_file/file_ops.c | |
parent | 8e55780aa75da5a8f93a927ab93f605d7c580625 (diff) |
fix for crash when loading the file selector on startup.
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 4 |
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) |