[gtk/matthiasc/a11y: 2/8] a11y: Ignore widgets during destruction
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtk/matthiasc/a11y: 2/8] a11y: Ignore widgets during destruction
- Date: Fri,  9 Oct 2020 19:17:27 +0000 (UTC)
commit be77df5e6c0942de3dba4e3a748e85e53527c6d2
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]