From: Lukáš Tyrychtr Date: Thu, 16 Mar 2023 14:16:32 +0000 (+0100) Subject: a11y: Fix the logic in gtk_accessible_get_next_accessible_sibling which X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~542^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=771b7d6caaf7288c2612c0eb2a8246f7c7607df1;p=gtk4.git a11y: Fix the logic in gtk_accessible_get_next_accessible_sibling which decided whether we will use the overridden sibling on the context. --- 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);