From 771b7d6caaf7288c2612c0eb2a8246f7c7607df1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Tyrychtr?= Date: Thu, 16 Mar 2023 15:16:32 +0100 Subject: [PATCH] a11y: Fix the logic in gtk_accessible_get_next_accessible_sibling which decided whether we will use the overridden sibling on the context. --- gtk/gtkaccessible.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gtk/gtkaccessible.c b/gtk/gtkaccessible.c index 873094a474..16bafe3fb7 100644 --- a/gtk/gtkaccessible.c +++ b/gtk/gtkaccessible.c @@ -251,16 +251,13 @@ gtk_accessible_get_next_accessible_sibling (GtkAccessible *self) GtkATContext *context; context = gtk_accessible_get_at_context (self); - if (context != NULL) + if (context != NULL && gtk_at_context_get_accessible_parent (context) != NULL) { GtkAccessible *sibling = NULL; - if (gtk_at_context_get_accessible_parent (context) != NULL) - { - sibling = gtk_at_context_get_next_accessible_sibling (context); - if (sibling != NULL) - sibling = g_object_ref (sibling); - } + sibling = gtk_at_context_get_next_accessible_sibling (context); + if (sibling != NULL) + sibling = g_object_ref (sibling); g_object_unref (context); -- 2.30.2