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.
This commit is contained in:
2015-05-26 12:08:29 +02:00
parent 718bc078a8
commit ded0004f8b

View File

@@ -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);