Commit 5ce761a2 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Don't crash if the path does not point to a row in the model. (#300909,

2005-04-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (gtk_icon_view_select_path): Don't crash
	if the path does not point to a row in the model.  (#300909,
	Mathias Hasselmann)
parent 3f9ade64
2005-04-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconview.c (gtk_icon_view_select_path): Don't crash
if the path does not point to a row in the model. (#300909,
Mathias Hasselmann)
* tests/testtext.c: Add some more attribute tests.
* gtk/gtktexttag.c (gtk_text_tag_class_init): Correct the documentation
......
2005-04-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconview.c (gtk_icon_view_select_path): Don't crash
if the path does not point to a row in the model. (#300909,
Mathias Hasselmann)
* tests/testtext.c: Add some more attribute tests.
* gtk/gtktexttag.c (gtk_text_tag_class_init): Correct the documentation
......
2005-04-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconview.c (gtk_icon_view_select_path): Don't crash
if the path does not point to a row in the model. (#300909,
Mathias Hasselmann)
* tests/testtext.c: Add some more attribute tests.
* gtk/gtktexttag.c (gtk_text_tag_class_init): Correct the documentation
......
......@@ -3480,19 +3480,17 @@ void
gtk_icon_view_select_path (GtkIconView *icon_view,
GtkTreePath *path)
{
GtkIconViewItem *item;
GList *l;
g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
g_return_if_fail (icon_view->priv->model != NULL);
g_return_if_fail (path != NULL);
item = g_list_nth (icon_view->priv->items,
gtk_tree_path_get_indices(path)[0])->data;
l = g_list_nth (icon_view->priv->items,
gtk_tree_path_get_indices(path)[0]);
if (!item)
return;
gtk_icon_view_select_item (icon_view, item);
if (l != NULL)
gtk_icon_view_select_item (icon_view, l->data);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment