From 7398323b820ea7d1c432e3a0642d9c32531b6be4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 4 Aug 2020 11:00:32 -0400 Subject: [PATCH] scrolledwindow: Fix a11y support code This error was introduced by me in 971ee2d28a65b816050c and causes a crash in the scrolling benchmark in gtk-demo. Fixes: #3014 --- gtk/gtkscrolledwindow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);