From 9ba3a4e0e6ad8ff248bf71a27274fe0976e864ab Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 8 Feb 2017 09:24:14 +1100 Subject: Bug [#1907]. GTK: Prevent running signal handlers on a destroyed a11y object Avoid crash when detaching the widget from the accessible object without destroying that widget. In such situations, the widget is still valid but we will have destroyed the orphaned accessible object. Thus, we must make sure we disconnected the signal handlers the late accessible had set up on the widget, as they won't be implicitly disconnected by widget finalization in this case. --- gtk/ScintillaGTKAccessible.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'gtk') diff --git a/gtk/ScintillaGTKAccessible.cxx b/gtk/ScintillaGTKAccessible.cxx index ecf843ce5..c1db5623e 100644 --- a/gtk/ScintillaGTKAccessible.cxx +++ b/gtk/ScintillaGTKAccessible.cxx @@ -162,6 +162,7 @@ ScintillaGTKAccessible::ScintillaGTKAccessible(GtkAccessible *accessible_, GtkWi } ScintillaGTKAccessible::~ScintillaGTKAccessible() { + g_signal_handlers_disconnect_matched(sci->sci, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, this); } gchar *ScintillaGTKAccessible::GetTextRangeUTF8(Position startByte, Position endByte) { -- cgit v1.2.3