MFH: r553166

Fix crash on close due to a signal handler on VTE widget being fired
after the widget is destroyed.

PR:		250403
Submitted by:	Hodong <hodong@nimfsoft.com>

Approved by:	ports-secteam (joneum)
This commit is contained in:
Guido Falsi 2020-10-24 10:42:05 +00:00
parent df9c462b9c
commit c895287d1f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2020Q4/; revision=553178
2 changed files with 13 additions and 1 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= geany
PORTVERSION= 1.36
PORTREVISION= 1
CATEGORIES= devel editors
MASTER_SITES= http://download.geany.org/ SF
@ -42,17 +43,18 @@ NLS_CONFIGURE_ENABLE= nls
VTE_DESC= Embedded virtual terminal
VTE_CONFIGURE_ENABLE= vte
VTE_USE= GNOME=vte
THEMES_DESC= Additional color schemes
THEMES_RUN_DEPENDS= ${LOCALBASE}/share/geany/colorschemes/bespin.conf:devel/geany-themes
.if ${FLAVOR} == gtk2
USE_GNOME+= gtk20
VTE_USE= GNOME=vte
CONFIGURE_ARGS+= --disable-gtk3
PLIST_SUB+= GTK2="" GTK3="@comment "
.elif ${FLAVOR} == gtk3
USE_GNOME+= gtk30
VTE_USE= GNOME=vte3
CONFIGURE_ARGS+= --enable-gtk3
PLIST_SUB+= GTK2="@comment " GTK3=""
.endif

View File

@ -0,0 +1,10 @@
--- src/vte.c.orig 2019-09-28 12:38:17 UTC
+++ src/vte.c
@@ -399,6 +399,7 @@ void vte_close(void)
g_free(vf);
/* free the vte widget before unloading vte module
* this prevents a segfault on X close window if the message window is hidden */
+ g_signal_handlers_disconnect_by_func(vc->vte, G_CALLBACK(vte_start), NULL);
gtk_widget_destroy(vc->vte);
gtk_widget_destroy(vc->menu);
g_object_unref(vc->menu);