[gtk/a11y/atspi: 6/28] a11y: Ignore widgets during destruction




commit 658d910967476ab28f1caefaa65d9ba9a5d2dc46
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Oct 9 12:33:50 2020 +0100

    a11y: Ignore widgets during destruction
    
    There's no point in creating a GtkATContext when a widget is getting
    destroyed.

 gtk/gtkwidget.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b6489a284a..af1f84c051 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]