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.
This commit is contained in:
parent
a31039e1ed
commit
0511640815
|
@ -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));
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
Loading…
Reference in New Issue