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:
authorJulian Eisel <eiseljulian@gmail.com>2015-07-10 00:48:55 +0300
committerJulian Eisel <eiseljulian@gmail.com>2015-07-10 00:48:55 +0300
commit5513fdc62988ec92a0c76824b2a8d56a88c02254 (patch)
tree4d7c97edf1dd76b19e9b4f7abca25a252acbc077 /source/blender/editors/space_file/file_ops.c
parentf766a61626b0d1616eb0298340d18eec8ca81777 (diff)
Fix T45398: Saving file from File Browser doesn't work if no file is selected
Own mistake in rBaeeb23efa28dc16e20
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r--source/blender/editors/space_file/file_ops.c7
1 files 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);
}