[Bf-blender-cvs] [29780b8101e] blender-v2.91-release: Remove incorrect assert in button group code

Hans Goudey noreply at git.blender.org
Wed Nov 4 20:25:21 CET 2020


Commit: 29780b8101eb7fa14a8729ff2cd7b73ef4e84c5a
Author: Hans Goudey
Date:   Wed Nov 4 13:21:26 2020 -0600
Branches: blender-v2.91-release
https://developer.blender.org/rB29780b8101eb7fa14a8729ff2cd7b73ef4e84c5a

Remove incorrect assert in button group code

Even after the last commit to fix this assert, it still fails in the
case where a button was added before there was a button group
added to the block. Another fix for this would be to always create
a button group in UI_block_begin, but this assert has no particular
purpose, so it's simpler to just remove it.

===================================================================

M	source/blender/editors/interface/interface_button_group.c

===================================================================

diff --git a/source/blender/editors/interface/interface_button_group.c b/source/blender/editors/interface/interface_button_group.c
index 3d82b84399c..2d2da9a4d14 100644
--- a/source/blender/editors/interface/interface_button_group.c
+++ b/source/blender/editors/interface/interface_button_group.c
@@ -86,9 +86,6 @@ void ui_button_group_replace_but_ptr(uiBlock *block, const void *old_but_ptr, ui
       }
     }
   }
-
-  /* The button should be in a group, otherwise there are no button groups at all. */
-  BLI_assert(BLI_listbase_is_empty(&block->button_groups));
 }
 
 /** \} */



More information about the Bf-blender-cvs mailing list