scintilla: Fix crash after destroying the widget on GTK < 3.3.6
commit1421a3f9c59a41074636a26cca6b431c3af40226
authorColomban Wendling <ban@herbesfolles.org>
Sun, 26 Feb 2017 19:01:52 +0000 (26 20:01 +0100)
committerColomban Wendling <ban@herbesfolles.org>
Sun, 26 Feb 2017 19:07:33 +0000 (26 20:07 +0100)
treed8d60657a9e8899b5e15f561bf6a8749b0c2bfa5
parentdf05fc87120141da8e9fc5b67ac10dd550891e04
scintilla: Fix crash after destroying the widget on GTK < 3.3.6

On GTK2 and GTK3 < 3.3.6 there is no GtkAccessibleClass::widget_unset()
method, so we can't destroy our accessible object right away.  So, to
avoid accessing a destroyed widget, we need to check whether the widget
still exists in the the ScintillaGTKAccessible destructor.

In other methods it's not necessary because the wrapping GObject class
makes sure not to forward other when the widget has been destroyed, but
we still have to destroy the C++ instance no matter what, so the check
has to be on this side.

Fixes #1410.
scintilla/gtk/ScintillaGTKAccessible.cxx