From ded0004f8b6adc57a34e4439fc22bfdf3909919f Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Tue, 26 May 2015 12:08:29 +0200 Subject: [PATCH] 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. --- source/blender/editors/interface/interface_layout.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index e8974b8571c..216254a0415 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);