[gtk] menubar: Don't crash when cycling through menubars



commit 7d61aad12cdc1bf035a62716fbdb9997c60eae90
Author: Timm Bäder <mail baedert org>
Date:   Thu Mar 29 08:32:51 2018 +0200

    menubar: Don't crash when cycling through menubars

 gtk/gtkmenubar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]