diff options
author | Hans Goudey <h.goudey@me.com> | 2020-11-04 01:30:58 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-11-04 01:30:58 +0300 |
commit | 9e8a488af2093c2724af9372aebb96f5e6736a65 (patch) | |
tree | 894f8f10504b94eb6759a51db964ddbdd171f9fd /source | |
parent | 5650468c842eebef01c4959965b48dde686b8328 (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
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface.c | 2 |
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; |