[Bf-blender-cvs] [5513fdc] master: Fix T45398: Saving file from File Browser doesn't work if no file is selected
Julian Eisel
noreply at git.blender.org
Thu Jul 9 23:50:26 CEST 2015
Commit: 5513fdc62988ec92a0c76824b2a8d56a88c02254
Author: Julian Eisel
Date: Thu Jul 9 23:48:55 2015 +0200
Branches: master
https://developer.blender.org/rB5513fdc62988ec92a0c76824b2a8d56a88c02254
Fix T45398: Saving file from File Browser doesn't work if no file is selected
Own mistake in rBaeeb23efa28dc16e20
===================================================================
M source/blender/editors/space_file/file_ops.c
===================================================================
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index e01b197..1b19a8d 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);
}
More information about the Bf-blender-cvs
mailing list