listbox: Avoid a warning

Don't try to set an adjustment value if we don't have an adjustment.
This commit is contained in:
Matthias Clasen 2014-07-13 15:51:03 -04:00
parent fc6e2cc4b2
commit a67570b9e0

View File

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