summaryrefslogtreecommitdiff
path: root/src/gui_gtk_x11.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-29 22:16:09 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-29 22:16:09 +0200
commit32fbc4f247a31e35ade0939542e11aa033a2554f (patch)
treecea3a54d1e1ef26be78ce4ee78b895c81b57eb16 /src/gui_gtk_x11.c
parent1b9129809d8269acb8e7c79d8fc99c7976b4f76e (diff)
downloadvim-git-32fbc4f247a31e35ade0939542e11aa033a2554f.tar.gz
patch 8.2.1774: GTK: hang when forced to exitv8.2.1774
Problem: GTK: hang when forced to exit. Solution: Do not clean up "mainwin" when really_exiting is set. (Zdenek Dohnal, closes #7042)
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r--src/gui_gtk_x11.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index fe1ac5878..ecd2d887f 100644
--- 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);
}