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:
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r--source/blender/editors/interface/interface.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 2cb58c92449..8b149e2f97b 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3988,12 +3988,16 @@ uiBut *ui_but_change_type(uiBut *but, eButType new_type)
const void *old_but_ptr = but;
/* Button may have pointer to a member within itself, this will have to be updated. */
const bool has_str_ptr_to_self = but->str == but->strdata;
+ const bool has_poin_ptr_to_self = but->poin == (char *)but;
but = MEM_recallocN_id(but, alloc_size, alloc_str);
but->type = new_type;
if (has_str_ptr_to_self) {
but->str = but->strdata;
}
+ if (has_poin_ptr_to_self) {
+ but->poin = (char *)but;
+ }
BLI_insertlinkafter(&but->block->buttons, insert_after_but, but);