summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2022-09-21 22:13:53 +0200
committerChristian Persch <chpe@src.gnome.org>2022-09-21 22:13:53 +0200
commitc735479b7542b938bfb9709860fff58c5ca9fe6f (patch)
tree687fa9e4df60f56275f46e7937088076af7707f3
parent3cffe18b25a4c04e9ee0c7e090f349805d43c680 (diff)
downloadvte-c735479b7542b938bfb9709860fff58c5ca9fe6f.tar.gz
app: Disconnect signal handlers on dispose
Fixes two critical warnings when closing a window with the close button.
-rw-r--r--src/app/app.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/app/app.cc b/src/app/app.cc
index 1b849d41..9809af61 100644
--- a/src/app/app.cc
+++ b/src/app/app.cc
@@ -2753,6 +2753,15 @@ vteapp_window_dispose(GObject *object)
window->search_popover = nullptr;
}
+ // Disconnect all signal handlers from the terminal
+ g_signal_handlers_disconnect_matched(window->terminal,
+ GSignalMatchType(G_SIGNAL_MATCH_DATA),
+ 0, // signal id
+ 0, // detail quark
+ nullptr, // closure
+ nullptr, // func
+ window);
+
G_OBJECT_CLASS(vteapp_window_parent_class)->dispose(object);
}