a11y: Ignore widgets during destruction

There's no point in creating a GtkATContext when a widget is getting
destroyed.
This commit is contained in:
Emmanuele Bassi
2020-10-09 12:33:50 +01:00
parent bd43e9cfc5
commit 658d910967

View File

@@ -8091,6 +8091,9 @@ gtk_widget_accessible_get_at_context (GtkAccessible *accessible)
GtkWidget *self = GTK_WIDGET (accessible);
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (self);
if (priv->in_destruction)
return NULL;
if (priv->at_context == NULL)
{
GtkWidgetClass *widget_class = GTK_WIDGET_GET_CLASS (self);