diff options
author | Timm Bäder <mail@baedert.org> | 2018-03-29 08:32:51 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2018-03-30 23:15:04 +0200 |
commit | 7d61aad12cdc1bf035a62716fbdb9997c60eae90 (patch) | |
tree | 1165aff86e3b0a18b95d01b1612740cb5234a60c /gtk/gtkmenubar.c | |
parent | f78598dd9b540be8e0cf34883fa40b3c63f9b7c7 (diff) | |
download | gtk+-7d61aad12cdc1bf035a62716fbdb9997c60eae90.tar.gz |
menubar: Don't crash when cycling through menubars
Diffstat (limited to 'gtk/gtkmenubar.c')
-rw-r--r-- | gtk/gtkmenubar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c index 170c2722dc..27e444057e 100644 --- a/gtk/gtkmenubar.c +++ b/gtk/gtkmenubar.c @@ -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); |