From 1a6d60b7d7dc41a663e77dabe32a67f6ebb39e5f Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 17 Jun 2023 22:02:38 +0200 Subject: [PATCH] inspector: Handle a11y being disabled --- gtk/inspector/a11y.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.30.2