[Bf-blender-cvs] [ded0004] master: Don't crash with pie menus with more than 8 items.

Antony Riakiotakis noreply at git.blender.org
Tue May 26 12:10:00 CEST 2015


Commit: ded0004f8b6adc57a34e4439fc22bfdf3909919f
Author: Antony Riakiotakis
Date:   Tue May 26 12:08:29 2015 +0200
Branches: master
https://developer.blender.org/rBded0004f8b6adc57a34e4439fc22bfdf3909919f

Don't crash with pie menus with more than 8 items.

This will print a warning and users will get overlap of pie buttons, but
it should be quick paper over the cracks and at least should keep
blender working until a more complete fix is coded.

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

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

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

diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index e8974b8..216254a0 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -2147,7 +2147,11 @@ static void ui_litem_layout_column(uiLayout *litem)
 static RadialDirection ui_get_radialbut_vec(float vec[2], short itemnum)
 {
 	RadialDirection dir;
-	BLI_assert(itemnum < 8);
+
+	if (itemnum < 8) {
+		itemnum %= 8;
+		printf("Warning: Pie menus with more than 8 items are currently unsupported\n");
+	}
 
 	dir = ui_radial_dir_order[itemnum];
 	ui_but_pie_dir(dir, vec);




More information about the Bf-blender-cvs mailing list