[gtk/a11y-crash: 1/2] scrolledwindow: Fix a11y support code
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/a11y-crash: 1/2] scrolledwindow: Fix a11y support code
- Date: Tue, 4 Aug 2020 15:04:48 +0000 (UTC)
commit 7398323b820ea7d1c432e3a0642d9c32531b6be4
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Aug 4 11:00:32 2020 -0400
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]