[vte/vte-0-54] widget: Disconnect GtkSettings signals in destructor
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-0-54] widget: Disconnect GtkSettings signals in destructor
- Date: Sun, 9 Dec 2018 21:24:46 +0000 (UTC)
commit 7487c22f231b38295fc0ea008a83e42f0c0c0244
Author: Egmont Koblinger <egmont gmail com>
Date: Sun Dec 9 22:20:29 2018 +0100
widget: Disconnect GtkSettings signals in destructor
This fixes a crash when the cursor blink settings are modified
after a terminal exits.
https://gitlab.gnome.org/GNOME/vte/issues/77
(cherry picked from commit 76c7dcab5ea80ca3fc6338765eaf7a49b4833b56)
src/vte.cc | 4 ----
src/widget.cc | 5 +++++
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index bdae253d..1bebc073 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -8425,10 +8425,6 @@ Terminal::~Terminal()
g_object_unref(m_vadjustment);
}
- g_signal_handlers_disconnect_matched (gtk_widget_get_settings(m_widget), G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL,
- this);
-
/* Update rects */
g_array_free(m_update_rects, TRUE /* free segment */);
}
diff --git a/src/widget.cc b/src/widget.cc
index deaf789d..331ddba9 100644
--- a/src/widget.cc
+++ b/src/widget.cc
@@ -103,6 +103,11 @@ Widget::Widget(VteTerminal* t) noexcept :
Widget::~Widget() noexcept
{
+ g_signal_handlers_disconnect_matched(gtk_widget_get_settings(m_widget),
+ G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL,
+ this);
+
m_widget = nullptr;
m_terminal->~Terminal();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]