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:
authorHans Goudey <h.goudey@me.com>2020-11-04 01:30:58 +0300
committerHans Goudey <h.goudey@me.com>2020-11-04 01:30:58 +0300
commit9e8a488af2093c2724af9372aebb96f5e6736a65 (patch)
tree894f8f10504b94eb6759a51db964ddbdd171f9fd
parent5650468c842eebef01c4959965b48dde686b8328 (diff)
Fix T81691: Use-after-free with property search and hovered button
The list of buttons in the button group needs to be updated to take into account the old button inserted into the button list for the new block. Differential Revision: https://developer.blender.org/D9428
-rw-r--r--source/blender/editors/interface/interface.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 601ab44c3d6..dc20e6f1813 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -832,6 +832,8 @@ static bool ui_but_update_from_old_block(const bContext *C,
/* move button over from oldblock to new block */
BLI_remlink(&oldblock->buttons, oldbut);
BLI_insertlinkafter(&block->buttons, but, oldbut);
+ /* Add the old button to the button groups in the new block. */
+ ui_button_group_replace_but_ptr(block, but, oldbut);
oldbut->block = block;
*but_p = oldbut;