From a67570b9e039dc0cf4c697d4dc19325c7331dd4d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 13 Jul 2014 15:51:03 -0400 Subject: [PATCH] listbox: Avoid a warning Don't try to set an adjustment value if we don't have an adjustment. --- gtk/gtklistbox.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c index d3afac46b5..d13b78770e 100644 --- a/gtk/gtklistbox.c +++ b/gtk/gtklistbox.c @@ -1335,6 +1335,9 @@ ensure_row_visible (GtkListBox *box, GtkWidget *widget; GtkAllocation allocation; + if (!priv->adjustment) + return; + /* If the row has a header, we want to ensure that it is visible as well. */ header = ROW_PRIV (row)->header; if (GTK_IS_WIDGET (header) && gtk_widget_is_drawable (header))