diff options
author | Hans Goudey <h.goudey@me.com> | 2020-11-04 07:03:08 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-11-04 07:03:08 +0300 |
commit | 05116408154c272ee459a1d6371411bfe94d1e84 (patch) | |
tree | 579bfa445c3847298ac1e19e6eacc422df939c07 /source/blender/editors/interface | |
parent | a31039e1ed50c236dab859e99a823efc4e42b985 (diff) |
Fix assert on mouseover of blocks not using the layout system
When there was an active button in the "old" block from the last redraw,
this code tried to replace its pointer in the new block's button groups.
But in cases like the outliner or file browser, there are no groups
because the block doesn't use the layout system at all. This commit
just tweaks the assert to check whether there are any button groups.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_button_group.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_button_group.c b/source/blender/editors/interface/interface_button_group.c index 1f544831982..3d82b84399c 100644 --- a/source/blender/editors/interface/interface_button_group.c +++ b/source/blender/editors/interface/interface_button_group.c @@ -87,8 +87,8 @@ void ui_button_group_replace_but_ptr(uiBlock *block, const void *old_but_ptr, ui } } - /* The button should be in a group. */ - BLI_assert(false); + /* The button should be in a group, otherwise there are no button groups at all. */ + BLI_assert(BLI_listbase_is_empty(&block->button_groups)); } /** \} */ |