aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-folder-selector-button.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-10-01 02:21:26 +0800
committerDan Winship <danw@src.gnome.org>2002-10-01 02:21:26 +0800
commitb887e5c2f6fdb8e7437093c3bc49fd439155e346 (patch)
tree4398b98313003716fc0dcde086b0f1331ddba312 /shell/evolution-folder-selector-button.c
parent6d5496e6141bd4afd720e9c125855f4ca7fbe759 (diff)
downloadgsoc2013-evolution-b887e5c2f6fdb8e7437093c3bc49fd439155e346.tar.gz
gsoc2013-evolution-b887e5c2f6fdb8e7437093c3bc49fd439155e346.tar.zst
gsoc2013-evolution-b887e5c2f6fdb8e7437093c3bc49fd439155e346.zip
If we return from evolution_shell_client_user_select_folder to find that
* evolution-folder-selector-button.c (clicked): If we return from evolution_shell_client_user_select_folder to find that our parent window has been destroyed, unref it and bail out, since that means we've been destroyed (and probably finalized) too. #31360 svn path=/trunk/; revision=18264
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));