summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserbutton.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2007-03-12 04:09:25 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-03-12 04:09:25 +0000
commitb8673de8cd677971b1d81b6620e3f3e8131c2e2b (patch)
tree632829025fc60e374501592d7c9657ccbd32691f /gtk/gtkfilechooserbutton.c
parentd58a93a023f97d8d4af5766653d720bd1fb1383e (diff)
downloadgtk+-b8673de8cd677971b1d81b6620e3f3e8131c2e2b.tar.gz
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
Diffstat (limited to 'gtk/gtkfilechooserbutton.c')
-rw-r--r--gtk/gtkfilechooserbutton.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index e5c23d613e..dfeba8d83c 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -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);
- g_object_unref (pixbuf);
+ 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_set (data->button->priv->icon_cell,
+ "width", width,
+ NULL);
+ }
+ g_object_unref (pixbuf);
}
out: