From 23b37da67d086e1d6888ca60c2da10ba755cad6a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 17 Aug 2006 04:42:27 +0000 Subject: [PATCH] Handle the case where the filechooser button is destroyed quickly. 2006-08-17 Matthias Clasen * gtk/gtkfilechooserbutton.c (set_info_get_info_cb) (model_add_special_get_info_cb): Handle the case where the filechooser button is destroyed quickly. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ gtk/gtkfilechooserbutton.c | 8 ++++++++ 3 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 79a8fae4b0..02ce3e26ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-08-17 Matthias Clasen + + * gtk/gtkfilechooserbutton.c (set_info_get_info_cb) + (model_add_special_get_info_cb): Handle the case where the + filechooser button is destroyed quickly. + 2006-08-17 Paolo Borelli * gtk/gtktextbuffer.c: make sure the has-selection property is diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 79a8fae4b0..02ce3e26ac 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2006-08-17 Matthias Clasen + + * gtk/gtkfilechooserbutton.c (set_info_get_info_cb) + (model_add_special_get_info_cb): Handle the case where the + filechooser button is destroyed quickly. + 2006-08-17 Paolo Borelli * gtk/gtktextbuffer.c: make sure the has-selection property is diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index ad57571f8b..0aaea8ebc9 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -1397,6 +1397,10 @@ set_info_get_info_cb (GtkFileSystemHandle *handle, GtkFileSystemHandle *model_handle; struct SetDisplayNameData *data = callback_data; + if (!data->button->priv->model) + /* button got destroyed */ + goto out; + path = gtk_tree_row_reference_get_path (data->row_ref); if (!path) /* Handle doesn't exist anymore in the model */ @@ -1565,6 +1569,10 @@ model_add_special_get_info_cb (GtkFileSystemHandle *handle, GtkFileSystemHandle *model_handle; struct ChangeIconThemeData *data = user_data; + if (!data->button->priv->model) + /* button got destroyed */ + goto out; + path = gtk_tree_row_reference_get_path (data->row_ref); if (!path) /* Handle doesn't exist anymore in the model */