Fix T50386: Crash when spawning pie menus

D2455 by @raa, thanks!
This commit is contained in:
Julian Eisel 2017-01-24 21:35:38 +01:00
parent 605695de61
commit 8a6c689f30
Notes: blender-bot 2023-02-14 19:43:08 +01:00
Referenced by issue blender/blender-addons#50386, Regression with pie menus addon 'Z' hotkey in master
1 changed files with 5 additions and 1 deletions

View File

@ -581,6 +581,9 @@ static void ui_item_enum_expand(
UI_block_layout_set_current(block, layout_radial);
}
else {
if (layout->item.type == ITEM_LAYOUT_RADIAL) {
layout_radial = layout;
}
UI_block_layout_set_current(block, layout);
}
}
@ -593,8 +596,9 @@ static void ui_item_enum_expand(
for (item = item_array; item->identifier; item++) {
if (!item->identifier[0]) {
if (radial)
if (radial && layout_radial) {
uiItemS(layout_radial);
}
continue;
}