summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2020-12-23 18:53:33 +0100
committerChristian Persch <chpe@src.gnome.org>2020-12-23 18:53:33 +0100
commit69f941dbe2a6df6513ec7f0cce6fbded20257beb (patch)
treef3c0ce4bccb4f5fde96bf5a278d5ca659ffd17a3
parent8586e4292e76943a100a8039f5ce9e33e5984bb3 (diff)
downloadvte-69f941dbe2a6df6513ec7f0cce6fbded20257beb.tar.gz
widget: Fix idle child-exited signal after dispose
Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/322
-rw-r--r--src/vte.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/vte.cc b/src/vte.cc
index 4674241d..d813e16c 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -898,12 +898,17 @@ Terminal::emit_eof()
static gboolean
emit_eof_idle_cb(VteTerminal *terminal)
+try
{
_vte_terminal_get_impl(terminal)->emit_eof();
- // @terminal might be destroyed at this point
return G_SOURCE_REMOVE;
}
+catch (...)
+{
+ vte::log_exception();
+ return G_SOURCE_REMOVE;
+}
void
Terminal::queue_eof()
@@ -928,12 +933,17 @@ Terminal::emit_child_exited()
static gboolean
emit_child_exited_idle_cb(VteTerminal *terminal)
+try
{
_vte_terminal_get_impl(terminal)->emit_child_exited();
- // @terminal might be destroyed at this point
return G_SOURCE_REMOVE;
}
+catch (...)
+{
+ vte::log_exception();
+ return G_SOURCE_REMOVE;
+}
/* Emit a "child-exited" signal on idle, so that if the handler destroys
* the terminal, we're not deep within terminal code callstack