diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-05-11 16:35:48 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-05-11 16:45:47 +0300 |
commit | 741e8cc118e6468dc9f68f6472054921fea6dd8b (patch) | |
tree | 6527ee11a6a307e33e90b9997de8db90bd6565e8 | |
parent | f28b4c304c06408ecdd135d5cb40e16574f15e44 (diff) |
Fix (unreported) annoying UI assert for expanded enums.
All buttons will get their own block's `func` by default, this cannot be
considered an error, do not assert in that case either.
Fixes bunch of very annoying asserts e.g. when using FBX exporter...
-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)); } |