diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index a2f8fcaf4e..7af5ce0563 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -4195,7 +4195,10 @@ gtk_scrolled_window_set_child (GtkScrolledWindow *scrolled_window, NULL); } - list = g_list_append (NULL, priv->child); + if (priv->child) + list = g_list_append (NULL, priv->child); + else + list = NULL; gtk_accessible_update_relation (GTK_ACCESSIBLE (priv->hscrollbar), GTK_ACCESSIBLE_RELATION_CONTROLS, list, -1); diff --git a/gtk/gtktestatcontext.c b/gtk/gtktestatcontext.c index ff0b6833fd..e1bf0f5d1d 100644 --- a/gtk/gtktestatcontext.c +++ b/gtk/gtktestatcontext.c @@ -49,16 +49,16 @@ gtk_test_at_context_state_change (GtkATContext *self, GtkAccessibleAttributeSet *properties, GtkAccessibleAttributeSet *relations) { - char *states_str = gtk_accessible_attribute_set_to_string (states); - char *properties_str = gtk_accessible_attribute_set_to_string (properties); - char *relations_str = gtk_accessible_attribute_set_to_string (relations); - - GTK_NOTE(A11Y, + if (GTK_DEBUG_CHECK (A11Y)) { + char *states_str = gtk_accessible_attribute_set_to_string (states); + char *properties_str = gtk_accessible_attribute_set_to_string (properties); + char *relations_str = gtk_accessible_attribute_set_to_string (relations); GtkAccessibleRole role = gtk_at_context_get_accessible_role (self); GtkAccessible *accessible = gtk_at_context_get_accessible (self); GEnumClass *class = g_type_class_ref (GTK_TYPE_ACCESSIBLE_ROLE); GEnumValue *value = g_enum_get_value (class, role); + g_print ("*** Accessible state changed for accessible ā€œ%sā€, with role ā€œ%sā€ (%d):\n" "*** states = %s\n" "*** properties = %s\n" @@ -70,11 +70,11 @@ gtk_test_at_context_state_change (GtkATContext *self, properties_str, relations_str); g_type_class_unref (class); - }); - g_free (states_str); - g_free (properties_str); - g_free (relations_str); + g_free (states_str); + g_free (properties_str); + g_free (relations_str); + } } static void