Handle the row reference path being NULL. (#410565, Joe Markus Clarke,

2007-03-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserbutton.c (change_icon_theme_get_info_cb):
        Handle the row reference path being NULL.  (#410565, Joe Markus
        Clarke, patch by Chris Wilson)

svn path=/trunk/; revision=17487
This commit is contained in:
Matthias Clasen 2007-03-12 04:09:25 +00:00 committed by Matthias Clasen
parent d58a93a023
commit b8673de8cd
2 changed files with 18 additions and 9 deletions

View File

@ -1,3 +1,9 @@
2007-03-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.c (change_icon_theme_get_info_cb):
Handle the row reference path being NULL. (#410565, Joe Markus
Clarke, patch by Chris Wilson)
2007-03-11 Matthias Clasen <mclasen@redhat.com>
* tests/testiconview.c: Handle Menu key presses without

View File

@ -1246,17 +1246,20 @@ change_icon_theme_get_info_cb (GtkFileSystemHandle *handle,
width = MAX (width, gdk_pixbuf_get_width (pixbuf));
path = gtk_tree_row_reference_get_path (data->row_ref);
gtk_tree_model_get_iter (data->button->priv->model, &iter, path);
gtk_tree_path_free (path);
if (path)
{
gtk_tree_model_get_iter (data->button->priv->model, &iter, path);
gtk_tree_path_free (path);
gtk_list_store_set (GTK_LIST_STORE (data->button->priv->model), &iter,
ICON_COLUMN, pixbuf,
-1);
gtk_list_store_set (GTK_LIST_STORE (data->button->priv->model), &iter,
ICON_COLUMN, pixbuf,
-1);
g_object_set (data->button->priv->icon_cell,
"width", width,
NULL);
}
g_object_unref (pixbuf);
g_object_set (data->button->priv->icon_cell,
"width", width,
NULL);
}
out: