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:
authorHans Goudey <h.goudey@me.com>2020-11-04 07:03:08 +0300
committerDalai Felinto <dalai@blender.org>2020-11-04 14:46:05 +0300
commitba6977cb8b8125e1fdebb3f876910ceaeadbe103 (patch)
tree9b264343e86ce695bbf1ef20ad3a44517b747964
parenta0db971acf0cd799f93fee557eb9df037a2309db (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.
-rw-r--r--source/blender/editors/interface/interface_button_group.c4
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));
}
/** \} */