Fix #138652: Crash editing an ID name after undo
Regression in [0] which missed updating the old-buttons data,
causing it to reference freed Main & ID pointers after undo.
Apply the same fix for uiBut::pushed_state_func.
[0]: 3e03576b09
This commit is contained in:
@@ -954,6 +954,9 @@ static void ui_but_update_old_active_from_new(uiBut *oldbut, uiBut *but)
|
||||
std::swap(oldbut->func_argN, but->func_argN);
|
||||
}
|
||||
|
||||
std::swap(oldbut->rename_full_func, but->rename_full_func);
|
||||
std::swap(oldbut->pushed_state_func, but->pushed_state_func);
|
||||
|
||||
/* Move tooltip from new to old. */
|
||||
std::swap(oldbut->tip_func, but->tip_func);
|
||||
std::swap(oldbut->tip_arg, but->tip_arg);
|
||||
|
||||
Reference in New Issue
Block a user