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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-29 05:09:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-29 05:09:00 +0300
commit018c9af446de10f038a6e641ca3a61ce451a7c92 (patch)
tree4f0428ea95446641dbdb3d78543cc38aaa81ff69 /source
parentb747524144c54c2c71d550de6331d96afc4cb711 (diff)
Fix T56120: bad property access (from 2.8)
Thanks to @brita_ for the fix.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_file/file_panels.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index c5350750af4..a40334098d7 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -80,17 +80,21 @@ static void file_panel_operator(const bContext *C, Panel *pa)
UI_block_func_set(uiLayoutGetBlock(pa->layout), file_draw_check_cb, NULL, NULL);
/* Hack: temporary hide.*/
- const char *hide[3] = {"filepath", "directory", "filename"};
+ const char *hide[] = {"filepath", "directory", "filename", "files"};
for (int i = 0; i < ARRAY_SIZE(hide); i++) {
- PropertyRNA *prop = RNA_struct_find_property(op->ptr, "filepath");
- RNA_def_property_flag(prop, PROP_HIDDEN);
+ PropertyRNA *prop = RNA_struct_find_property(op->ptr, hide[i]);
+ if (prop) {
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+ }
}
uiTemplateOperatorPropertyButs(C, pa->layout, op, '\0', UI_TEMPLATE_OP_PROPS_SHOW_EMPTY);
for (int i = 0; i < ARRAY_SIZE(hide); i++) {
- PropertyRNA *prop = RNA_struct_find_property(op->ptr, "filepath");
- RNA_def_property_clear_flag(prop, PROP_HIDDEN);
+ PropertyRNA *prop = RNA_struct_find_property(op->ptr, hide[i]);
+ if (prop) {
+ RNA_def_property_clear_flag(prop, PROP_HIDDEN);
+ }
}
UI_block_func_set(uiLayoutGetBlock(pa->layout), NULL, NULL, NULL);