diff options
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 15e507483ad..37ef0948dee 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -764,7 +764,8 @@ static void ui_item_enum_expand_elem_exec(uiLayout *layout, if (RNA_property_flag(prop) & PROP_ENUM_FLAG) { /* If this is set, assert since we're clobbering someone elses callback. */ - BLI_assert(but->func == NULL); + /* Buttons get their block's func by default, so we cannot assert in that case either. */ + BLI_assert(ELEM(but->func, NULL, block->func)); UI_but_func_set(but, ui_item_enum_expand_handle, but, POINTER_FROM_INT(value)); } |