summaryrefslogtreecommitdiff
path: root/gtk/gtkiconview.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-09-29 05:29:31 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-09-29 05:29:31 +0000
commitfa72b2c93c07b5df28c3887d2d2e3d70fe71e0f0 (patch)
tree90eb3ff2efbf72b75b6ecd6505531422b34c5b8a /gtk/gtkiconview.c
parent9ec74ba55bca095caa2eef8a75b9f26b7f063286 (diff)
downloadgtk+-fa72b2c93c07b5df28c3887d2d2e3d70fe71e0f0.tar.gz
Handle an empty icon view gracefully. (#152486)
2004-09-29 Matthias Clasen <mclasen@redhat.com> * gtk/gtkiconview.c (gtk_icon_view_move_cursor_left_right) (gtk_icon_view_move_cursor_start_end) (gtk_icon_view_move_cursor_page_up_down) (gtk_icon_view_move_cursor_up_down): Handle an empty icon view gracefully. (#152486)
Diffstat (limited to 'gtk/gtkiconview.c')
-rw-r--r--gtk/gtkiconview.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 69380d44b5..514234b47f 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -2584,7 +2584,7 @@ gtk_icon_view_move_cursor_up_down (GtkIconView *icon_view,
else
list = g_list_last (icon_view->priv->items);
- item = list->data;
+ item = list ? list->data : NULL;
}
else
item = find_item (icon_view,
@@ -2636,7 +2636,7 @@ gtk_icon_view_move_cursor_page_up_down (GtkIconView *icon_view,
else
list = g_list_last (icon_view->priv->items);
- item = list->data;
+ item = list ? list->data : NULL;
}
else
item = find_item_page_up_down (icon_view,
@@ -2688,7 +2688,7 @@ gtk_icon_view_move_cursor_left_right (GtkIconView *icon_view,
else
list = g_list_last (icon_view->priv->items);
- item = list->data;
+ item = list ? list->data : NULL;
}
else
item = find_item (icon_view,
@@ -2737,7 +2737,7 @@ gtk_icon_view_move_cursor_start_end (GtkIconView *icon_view,
else
list = g_list_last (icon_view->priv->items);
- item = list->data;
+ item = list ? list->data : NULL;
if (!item)
return;