[gthumb] grid view: do not show items before the relayout



commit e86e059c505e113553e569e3dc6aee0881a2ea1c
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Jan 30 23:15:24 2012 +0100

    grid view: do not show items before the relayout

 gthumb/gth-grid-view.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gthumb/gth-grid-view.c b/gthumb/gth-grid-view.c
index 8eda5de..2ab80ca 100644
--- a/gthumb/gth-grid-view.c
+++ b/gthumb/gth-grid-view.c
@@ -1131,7 +1131,7 @@ get_first_visible_at_offset (GthGridView *self,
 	GList *scan;
 	int    pos;
 
-	if (self->priv->n_items == 0)
+	if ((self->priv->n_items == 0) || (self->priv->lines == NULL))
 		return -1;
 
 	n_line = 0;
@@ -1162,7 +1162,7 @@ get_last_visible_at_offset (GthGridView *self,
 	GList *scan;
 	int    pos;
 
-	if (self->priv->n_items == 0)
+	if ((self->priv->n_items == 0) || (self->priv->lines == NULL))
 		return -1;
 
 	n_line = 0;



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