]> granicus.if.org Git - vim/commitdiff
patch 8.2.1713: Motif GUI: crash when setting menu colors v8.2.1713
authorBram Moolenaar <Bram@vim.org>
Sun, 20 Sep 2020 17:57:15 +0000 (19:57 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 20 Sep 2020 17:57:15 +0000 (19:57 +0200)
Problem:    Motif GUI: crash when setting menu colors. (Andrzej Bylicki)
Solution:   Add {} to make "n" incremented correctly. (closes #6989,
            closes #5948)

src/gui_motif.c
src/version.c

index 9d13b57b4e351cfe0b24753366f5beea23c754b9..57d50b0eed5a6e653ddd58222b38fea2bb56eb1a 100644 (file)
@@ -916,9 +916,13 @@ gui_mch_add_menu(vimmenu_T *menu, int idx)
 # endif
        {
            if (gui.menu_bg_pixel != INVALCOLOR)
+           {
                XtSetArg(arg[0], XmNbackground, gui.menu_bg_pixel); n++;
+           }
            if (gui.menu_fg_pixel != INVALCOLOR)
+           {
                XtSetArg(arg[1], XmNforeground, gui.menu_fg_pixel); n++;
+           }
            menu->submenu_id = XmCreatePopupMenu(textArea, "contextMenu",
                                                                      arg, n);
            menu->id = (Widget)0;
index 615abc74e2d0680a5da9b5e3f756d13364c5a767..a7def1b6cf8dd1d967e2876838e7332184715cad 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1713,
 /**/
     1712,
 /**/