diff options
author | Colomban Wendling <ban@herbesfolles.org> | 2017-02-08 09:24:14 +1100 |
---|---|---|
committer | Colomban Wendling <ban@herbesfolles.org> | 2017-02-08 09:24:14 +1100 |
commit | 9ba3a4e0e6ad8ff248bf71a27274fe0976e864ab (patch) | |
tree | a0842c317ba435e5bce5fb03d82aac4bfc021c08 | |
parent | 393c750b103cf86305ea4b9a78c8f8fe1504af26 (diff) | |
download | scintilla-mirror-9ba3a4e0e6ad8ff248bf71a27274fe0976e864ab.tar.gz |
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.
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rw-r--r-- | gtk/ScintillaGTKAccessible.cxx | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index a6140d833..aef93f448 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -568,6 +568,10 @@ Newer APIs used on GTK+ 3.22 as older APIs were deprecated. </li> <li> + Fix crash in accessibility code on GTK+ due to signal receipt after destruction. + <a href="http://sourceforge.net/p/scintilla/bugs/1907/">Bug #1907</a>. + </li> + <li> Make trackpad scrolling work on Wayland. <a href="http://sourceforge.net/p/scintilla/bugs/1901/">Bug #1901</a>. </li> 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) { |