changeset 22452:3845389725c9 v8.2.1774

patch 8.2.1774: GTK: hang when forced to exit Commit: https://github.com/vim/vim/commit/32fbc4f247a31e35ade0939542e11aa033a2554f Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 29 22:16:09 2020 +0200 patch 8.2.1774: GTK: hang when forced to exit Problem: GTK: hang when forced to exit. Solution: Do not clean up "mainwin" when really_exiting is set. (Zdenek Dohnal, closes #7042)
author Bram Moolenaar <Bram@vim.org>
date Tue, 29 Sep 2020 22:30:04 +0200
parents 9e097eb15d54
children a6725092ab5f
files src/gui_gtk_x11.c src/version.c
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -4381,11 +4381,14 @@ gui_mch_open(void)
     return OK;
 }
 
-
+/*
+ * Clean up for when exiting Vim.
+ */
     void
 gui_mch_exit(int rc UNUSED)
 {
-    if (gui.mainwin != NULL)
+    // Clean up, unless we don't want to invoke free().
+    if (gui.mainwin != NULL && !really_exiting)
 	gtk_widget_destroy(gui.mainwin);
 }
 
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1774,
+/**/
     1773,
 /**/
     1772,