diff options
author | Christian Persch <chpe@src.gnome.org> | 2020-12-23 18:53:33 +0100 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2020-12-23 18:53:33 +0100 |
commit | 69f941dbe2a6df6513ec7f0cce6fbded20257beb (patch) | |
tree | f3c0ce4bccb4f5fde96bf5a278d5ca659ffd17a3 | |
parent | 8586e4292e76943a100a8039f5ce9e33e5984bb3 (diff) | |
download | vte-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.cc | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -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 |