From: Benjamin Otte Date: Sat, 17 Jun 2023 20:02:38 +0000 (+0200) Subject: inspector: Handle a11y being disabled X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~132^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1a6d60b7d7dc41a663e77dabe32a67f6ebb39e5f;p=gtk4.git inspector: Handle a11y being disabled --- diff --git a/gtk/inspector/a11y.c b/gtk/inspector/a11y.c index 98c496fba1..3cb14ffc6a 100644 --- a/gtk/inspector/a11y.c +++ b/gtk/inspector/a11y.c @@ -238,6 +238,8 @@ update_name (GtkInspectorA11y *sl) char *name; context = gtk_accessible_get_at_context (GTK_ACCESSIBLE (sl->object)); + if (context == NULL) + return; name = gtk_at_context_get_name (context); gtk_label_set_label (GTK_LABEL (sl->name), name); @@ -250,6 +252,8 @@ update_description (GtkInspectorA11y *sl) char *description; context = gtk_accessible_get_at_context (GTK_ACCESSIBLE (sl->object)); + if (context == NULL) + return; description = gtk_at_context_get_description (context); gtk_label_set_label (GTK_LABEL (sl->description), description);