[gtk+] listbox: Avoid a warning



commit a67570b9e039dc0cf4c697d4dc19325c7331dd4d
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jul 13 15:51:03 2014 -0400

    listbox: Avoid a warning
    
    Don't try to set an adjustment value if we don't have an adjustment.

 gtk/gtklistbox.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index d3afac4..d13b787 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))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]