scrolledwindow: Fix a11y support code

This error was introduced by me in 971ee2d28a
and causes a crash in the scrolling benchmark in gtk-demo.

Fixes: #3014
This commit is contained in:
Matthias Clasen 2020-08-04 11:00:32 -04:00
parent bbb15f65a7
commit 7398323b82

View File

@ -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);