Bug fix [#33492] Right click on 'confirm reload' crashes
Context check could result in NULL - added provision for it and made sure the check is local only (for 1 new option)
This commit is contained in:
@@ -4629,7 +4629,6 @@ static void popup_add_shortcut_func(bContext *C, void *arg1, void *UNUSED(arg2))
|
||||
|
||||
static int ui_but_menu(bContext *C, uiBut *but)
|
||||
{
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
uiPopupMenu *pup;
|
||||
uiLayout *layout;
|
||||
int length;
|
||||
@@ -4845,9 +4844,13 @@ static int ui_but_menu(bContext *C, uiBut *but)
|
||||
}
|
||||
|
||||
/* Show header tools for header buttons. */
|
||||
if (ar->regiontype == RGN_TYPE_HEADER) {
|
||||
uiItemMenuF(layout, IFACE_("Header"), ICON_NONE, ED_screens_header_tools_menu_create, NULL);
|
||||
uiItemS(layout);
|
||||
if (CTX_wm_region(C)) {
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
if (ar->regiontype == RGN_TYPE_HEADER) {
|
||||
|
||||
uiItemMenuF(layout, IFACE_("Header"), ICON_NONE, ED_screens_header_tools_menu_create, NULL);
|
||||
uiItemS(layout);
|
||||
}
|
||||
}
|
||||
|
||||
{ /* Docs */
|
||||
|
||||
Reference in New Issue
Block a user