aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-folder-selector-button.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/evolution-folder-selector-button.c')
-rw-r--r--shell/evolution-folder-selector-button.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/shell/evolution-folder-selector-button.c b/shell/evolution-folder-selector-button.c
index 35e24e7d82..19fd5a69ae 100644
--- a/shell/evolution-folder-selector-button.c
+++ b/shell/evolution-folder-selector-button.c
@@ -163,6 +163,16 @@ clicked (GtkButton *button)
(const char **)priv->possible_types,
&return_folder);
+ /* If the parent gets destroyed despite our best efforts (eg,
+ * because its own parent got destroyed), then the folder
+ * selector button will have been destroyed too and we need
+ * to just bail out here.
+ */
+ if (GTK_OBJECT_DESTROYED (parent_window)) {
+ gtk_object_unref (GTK_OBJECT (parent_window));
+ return;
+ }
+
gtk_widget_set_sensitive (GTK_WIDGET (parent_window), TRUE);
gtk_object_unref (GTK_OBJECT (parent_window));