From 5513fdc62988ec92a0c76824b2a8d56a88c02254 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 9 Jul 2015 23:48:55 +0200 Subject: [PATCH] Fix T45398: Saving file from File Browser doesn't work if no file is selected Own mistake in rBaeeb23efa28dc16e20 --- source/blender/editors/space_file/file_ops.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index e01b1979e30..1b19a8d4d62 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -1265,13 +1265,10 @@ int file_exec(bContext *C, wmOperator *exec_op) const struct direntry *file = filelist_file(sfile->files, sfile->params->active_file); char filepath[FILE_MAX]; - if (!file) - return OPERATOR_CANCELLED; - - BLI_assert(STREQ(file->relname, "..") || STREQ(file->relname, sfile->params->file)); + BLI_assert(!file || STREQ(file->relname, "..") || STREQ(file->relname, sfile->params->file)); /* directory change */ - if (S_ISDIR(file->type)) { + if (file && S_ISDIR(file->type)) { if (FILENAME_IS_PARENT(file->relname)) { BLI_parent_dir(sfile->params->dir); }