From b887e5c2f6fdb8e7437093c3bc49fd439155e346 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 30 Sep 2002 18:21:26 +0000 Subject: 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 --- shell/ChangeLog | 7 +++++++ shell/evolution-folder-selector-button.c | 10 ++++++++++ 2 files changed, 17 insertions(+) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index d586926aff..659d5a191d 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,10 @@ +2002-09-30 Dan Winship + + * 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 + 2002-09-26 Ettore Perazzoli * e-local-storage.c (load_folder): Always return TRUE, even in the 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)); -- cgit v1.2.3