]> granicus.if.org Git - vim/commitdiff
patch 8.0.0637: crash when using some version of GTK 3 v8.0.0637
authorBram Moolenaar <Bram@vim.org>
Tue, 13 Jun 2017 12:34:01 +0000 (14:34 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 13 Jun 2017 12:34:01 +0000 (14:34 +0200)
Problem:    Crash when using some version of GTK 3.
Solution:   Add #ifdefs around incrementing the menu index. (Kazunobu
            Kuriyama)

src/gui_gtk.c
src/version.c

index c175dd31e95ce4c5ad2b81749087b867ae0fbd36..34069781a3a239b3be502c9181c26fc4250ae28b 100644 (file)
@@ -652,9 +652,11 @@ gui_mch_add_menu(vimmenu_T *menu, int idx)
     parent_widget = (parent != NULL) ? parent->submenu_id : gui.menubar;
     menu_item_new(menu, parent_widget);
 
+# if !GTK_CHECK_VERSION(3,4,0)
     /* since the tearoff should always appear first, increment idx */
     if (parent != NULL && !menu_is_popup(parent->name))
        ++idx;
+# endif
 
     gtk_menu_shell_insert(GTK_MENU_SHELL(parent_widget), menu->id, idx);
 
@@ -773,10 +775,12 @@ gui_mch_add_menu_item(vimmenu_T *menu, int idx)
        if (parent == NULL || parent->submenu_id == NULL)
            return;
 
+# if !GTK_CHECK_VERSION(3,4,0)
        /* Make place for the possible tearoff handle item.  Not in the popup
         * menu, it doesn't have a tearoff item. */
        if (!menu_is_popup(parent->name))
            ++idx;
+# endif
 
        if (menu_is_separator(menu->name))
        {
index 6d33f125d7f2920f39db1d6b04dd90e55bdf1f5d..23653c1df177b7b0a7ac660b9ce445bd9126c811 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    637,
 /**/
     636,
 /**/