Commit 76c7dcab authored by Egmont Koblinger's avatar Egmont Koblinger

widget: Disconnect GtkSettings signals in destructor

This fixes a crash when the cursor blink settings are modified
after a terminal exits.

#77
parent 53690d5c
......@@ -8177,10 +8177,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 */);
}
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment