[geany/geany] 0df7d5: scintilla: Prevent running signal handlers on a destroyed a11y object

Colomban Wendling git-noreply at xxxxx
Thu Feb 2 13:42:38 UTC 2017


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Thu, 02 Feb 2017 13:42:38 UTC
Commit:      0df7d5a03a3f3681294d246d3b3adcf9a9d01485
             https://github.com/geany/geany/commit/0df7d5a03a3f3681294d246d3b3adcf9a9d01485

Log Message:
-----------
scintilla: 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.

Fixes #1385.


Modified Paths:
--------------
    scintilla/gtk/ScintillaGTKAccessible.cxx

Modified: scintilla/gtk/ScintillaGTKAccessible.cxx
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -162,6 +162,7 @@ ScintillaGTKAccessible::ScintillaGTKAccessible(GtkAccessible *accessible_, GtkWi
 }
 
 ScintillaGTKAccessible::~ScintillaGTKAccessible() {
+	g_signal_handlers_disconnect_by_func (sci->sci, reinterpret_cast<gpointer>(SciNotify), this);
 }
 
 gchar *ScintillaGTKAccessible::GetTextRangeUTF8(Position startByte, Position endByte) {



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list