From 7795bfea6d30c85f2c05d986a0cfe4019df4d74d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 20 Sep 2020 19:57:15 +0200 Subject: patch 8.2.1713: Motif GUI: crash when setting menu colors 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 | 4 ++++ src/version.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/gui_motif.c b/src/gui_motif.c index 9d13b57b4..57d50b0ee 100644 --- a/src/gui_motif.c +++ b/src/gui_motif.c @@ -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; diff --git a/src/version.c b/src/version.c index 615abc74e..a7def1b6c 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1713, /**/ 1712, /**/ -- cgit v1.2.1