diff options
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_ops.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 7cec9c09767..3ae88f9cc78 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -99,8 +99,9 @@ static int file_browse_exec(bContext *C, wmOperator *op) char *str, path[FILE_MAX]; const char *path_prop = RNA_struct_find_property(op->ptr, "directory") ? "directory" : "filepath"; - if (RNA_struct_property_is_set(op->ptr, path_prop) == 0 || fbo == NULL) + if (RNA_struct_property_is_set(op->ptr, path_prop) == 0 || fbo == NULL) { return OPERATOR_CANCELLED; + } str = RNA_string_get_alloc(op->ptr, path_prop, NULL, 0); @@ -127,7 +128,9 @@ static int file_browse_exec(bContext *C, wmOperator *op) } else { char * const lslash = (char *)BLI_last_slash(str); - if (lslash) lslash[1] = '\0'; + if (lslash) { + lslash[1] = '\0'; + } } } @@ -176,8 +179,9 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event) UI_context_active_but_prop_get_filebrowser(C, &ptr, &prop, &is_undo); - if (!prop) + if (!prop) { return OPERATOR_CANCELLED; + } str = RNA_property_string_get_alloc(&ptr, prop, NULL, 0, NULL); @@ -189,8 +193,9 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event) if (event->alt) { char *lslash = (char *)BLI_last_slash(str); - if (lslash) + if (lslash) { *lslash = '\0'; + } } |