Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-05-26 13:08:29 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-05-26 13:09:51 +0300
commitded0004f8b6adc57a34e4439fc22bfdf3909919f (patch)
tree9c8c696f1dbbe818b268d3fb2c0567f5f6191709 /source/blender/editors/interface/interface_layout.c
parent718bc078a8dfb10b24fc2b78f5052e4aa56fc6e3 (diff)
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.
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r--source/blender/editors/interface/interface_layout.c6
1 files changed, 5 insertions, 1 deletions
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);