]> granicus.if.org Git - vim/commitdiff
patch 8.2.1774: GTK: hang when forced to exit v8.2.1774
authorBram Moolenaar <Bram@vim.org>
Tue, 29 Sep 2020 20:16:09 +0000 (22:16 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 29 Sep 2020 20:16:09 +0000 (22:16 +0200)
Problem:    GTK: hang when forced to exit.
Solution:   Do not clean up "mainwin" when really_exiting is set.
            (Zdenek Dohnal, closes #7042)

src/gui_gtk_x11.c
src/version.c

index fe1ac58782eb05674291ddc82081f202eacc8a56..ecd2d887fc9e863523c589abfe698722b51d62ef 100644 (file)
@@ -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);
 }
 
index acac541febba3bdf31737ed1563393b7c38978cf..550296687de2044e869da3457d2063ca8b815bcd 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1774,
 /**/
     1773,
 /**/