menubar: Don't crash when cycling through menubars

This commit is contained in:
Timm Bäder 2018-03-29 08:32:51 +02:00
parent f78598dd9b
commit 7d61aad12c

View File

@ -584,7 +584,7 @@ _gtk_menu_bar_cycle_focus (GtkMenuBar *menubar,
found = g_ptr_array_find (menubars, menubar, &index);
if (found && index < menubars->len)
if (found && index < menubars->len - 1)
{
GtkWidget *next = g_ptr_array_index (menubars, index + 1);
GtkMenuShell *new_menushell = GTK_MENU_SHELL (next);