From b041ad4c3b782bfebe7cbe63dc25e2c6352f2c60 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 12 Mar 2007 04:12:02 +0000 Subject: [PATCH] Handle the row reference path being NULL. (#410565, Joe Markus Clarke, 2007-03-12 Matthias Clasen * 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=/branches/gtk-2-10/; revision=17488 --- ChangeLog | 8 ++++++++ gtk/gtkfilechooserbutton.c | 21 ++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index c785a9a65d..f1b663279d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-03-12 Matthias Clasen + + Merge from trunk: + + * 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 Merge from trunk: diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index 29f978c87d..65f35a589e 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -1217,17 +1217,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: