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 <julian@blender.org>2020-09-10 16:28:55 +0300
committerJulian Eisel <julian@blender.org>2020-09-10 16:30:14 +0300
commit3cafaf0fa86859e81af21d55f0dbfc8c0e1b70a0 (patch)
tree5660bd8a2452c4fe334d092d44fa5092adb393b0 /source/blender/editors/interface/interface_layout.c
parenteecd3705d7cb5545433c25b00d15d4e545664bc8 (diff)
Fix possible use-after-free for number slider buttons
Mistake in e6f0b60c2e91.
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r--source/blender/editors/interface/interface_layout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 62321cb1e73..a37f87e593b 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -632,7 +632,7 @@ static void ui_item_array(uiLayout *layout,
uiButNumber *number_but = (uiButNumber *)but;
but->a1 = number_but->step_size;
- ui_but_change_type(but, UI_BTYPE_NUM_SLIDER);
+ but = ui_but_change_type(but, UI_BTYPE_NUM_SLIDER);
}
}
}
@@ -703,7 +703,7 @@ static void ui_item_array(uiLayout *layout,
uiButNumber *number_but = (uiButNumber *)but;
but->a1 = number_but->step_size;
- ui_but_change_type(but, UI_BTYPE_NUM_SLIDER);
+ but = ui_but_change_type(but, UI_BTYPE_NUM_SLIDER);
}
if ((toggle == 1) && but->type == UI_BTYPE_CHECKBOX) {
but->type = UI_BTYPE_TOGGLE;
@@ -2299,7 +2299,7 @@ void uiItemFullR(uiLayout *layout,
uiButNumber *num_but = (uiButNumber *)but;
but->a1 = num_but->step_size;
- ui_but_change_type(but, UI_BTYPE_NUM_SLIDER);
+ but = ui_but_change_type(but, UI_BTYPE_NUM_SLIDER);
}
if (flag & UI_ITEM_R_CHECKBOX_INVERT) {