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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-08-24 10:59:04 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-08-24 10:59:50 +0300
commit8cc8ce3d466126b68b2a73f0491c332526b01fe0 (patch)
tree8e6f723f6ae8aab5a8a438701ebbf7eeb794dc50 /source/blender/editors/space_file/file_ops.c
parent8031f36261df03d380a3aeb9fe52ec8bc54bacd9 (diff)
Fix some issues from lates coverity scan.
Unlikely, but still valid.
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r--source/blender/editors/space_file/file_ops.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index e1a0ee5edd2..7736a814efe 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -1275,10 +1275,14 @@ int file_exec(bContext *C, wmOperator *exec_op)
/* directory change */
if (file && (file->typeflag & FILE_TYPE_DIR)) {
+ if (!file->relpath) {
+ return OPERATOR_CANCELLED;
+ }
+
if (FILENAME_IS_PARENT(file->relpath)) {
BLI_parent_dir(sfile->params->dir);
}
- else if (file->relpath) {
+ else {
BLI_cleanup_dir(G.main->name, sfile->params->dir);
strcat(sfile->params->dir, file->relpath);
BLI_add_slash(sfile->params->dir);