Fix T70691: Crash picking object from eyedropper

Caused by 828905190e
This commit is contained in:
Campbell Barton 2019-10-10 16:41:34 +11:00
parent b548b3d57e
commit 7e020e70d9
Notes: blender-bot 2023-07-10 10:12:37 +02:00
Referenced by issue #70691, Crash picking object from eyedropper
2 changed files with 7 additions and 1 deletions

View File

@ -786,6 +786,8 @@ static bool ui_but_update_from_old_block(const bContext *C,
oldbut->flag = (oldbut->flag & ~flag_copy) | (but->flag & flag_copy);
oldbut->drawflag = (oldbut->drawflag & ~drawflag_copy) | (but->drawflag & drawflag_copy);
SWAP(ListBase, but->extra_op_icons, oldbut->extra_op_icons);
/* copy hardmin for list rows to prevent 'sticking' highlight to mouse position
* when scrolling without moving mouse (see [#28432]) */
if (ELEM(oldbut->type, UI_BTYPE_ROW, UI_BTYPE_LISTROW)) {

View File

@ -108,6 +108,7 @@ static int ui_do_but_EXIT(bContext *C,
const wmEvent *event);
static bool ui_but_find_select_in_enum__cmp(const uiBut *but_a, const uiBut *but_b);
static void ui_textedit_string_set(uiBut *but, struct uiHandleButtonData *data, const char *str);
static void button_tooltip_timer_reset(bContext *C, uiBut *but);
#ifdef USE_KEYNAV_LIMIT
static void ui_mouse_motion_keynav_init(struct uiKeyNavLock *keynav, const wmEvent *event);
@ -3967,8 +3968,11 @@ static bool ui_do_but_extra_operator_icon(bContext *C,
uiButExtraOpIcon *op_icon = ui_but_extra_operator_icon_mouse_over_get(but, data, event);
if (op_icon) {
ED_region_tag_redraw(data->region);
button_tooltip_timer_reset(C, but);
ui_but_extra_operator_icon_apply(C, but, op_icon);
button_activate_exit(C, but, data, false, false);
/* Note: 'but', 'data' may now be freed, don't access. */
return true;
}