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:
authorHans Goudey <h.goudey@me.com>2020-06-10 21:56:52 +0300
committerHans Goudey <h.goudey@me.com>2020-06-10 21:56:52 +0300
commitbfa5eceb89cfc1d9f120c35e2206464c31630111 (patch)
tree4155589eaadecec570501c19eba0c5321f7c7251 /source
parentfaf5f7b63d52f22b867619f4b38e5346fee56b37 (diff)
UI: Only set panel data expand flag for active panels
This solves a crash when switching from the modifiers tab to an armature object and expanding a panel. Thanks to Alexander Gavrilov for mentioning the problem.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_panel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index a83f1cc44db..5f56a93c5eb 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -563,7 +563,8 @@ static void set_panels_list_data_expand_flag(const bContext *C, ARegion *region)
continue;
}
- if (panel->type->flag & PNL_INSTANCED) {
+ /* Check for #PNL_ACTIVE so we only set the expand flag for active panels. */
+ if (panel_type->flag & PNL_INSTANCED && panel->runtime_flag & PNL_ACTIVE) {
short expand_flag = 0; /* Initialize to quite complaining compiler, value not used. */
short flag_index = 0;
get_panel_expand_flag(panel, &expand_flag, &flag_index);