From a02822a94ed38a72f24bc3ea61fdc42cd2ffcb62 Mon Sep 17 00:00:00 2001 From: 1 Date: Sun, 21 Oct 2001 20:28:58 +0000 Subject: Clear variables once done, for debugging. (mail_vfolder_add_uri, 2001-10-21 * mail-vfolder.c (mail_vfolder_shutdown): Clear variables once done, for debugging. (mail_vfolder_add_uri, mail_vfolder_delete_uri): Dont do anything if we're shutdown (context == NULL). * component-factory.c (idle_quit): Move mail_vfolder_shutdown here, it should be one of the last things shutdown. * mail-format.c (handle_text_plain): Dont use (if (!p++), and then check p!= later, since its now 1, oops. Fixes #13106, thought it was a start of uuencoded stuff! * folder-browser.c (on_right_click): Escape _'s before adding them to menu from mailing list name, also remove some dead code that someone forgot to remove when refactoring. #11307. (folder_browser_is_drafts): Use the store's uri_cmp function to compare to the drafts uri's. (folder_browser_is_sent): Same. Slight cleanup for #11351. svn path=/trunk/; revision=13856 --- mail/mail-vfolder.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'mail/mail-vfolder.c') diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index 12c70d0e0c..2132d8b699 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -305,7 +305,7 @@ mail_vfolder_add_uri(CamelStore *store, const char *uri, int remove) int remote = (((CamelService *)store)->provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0; GCompareFunc uri_cmp = CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->compare_folder_name; - if (CAMEL_IS_VEE_STORE(store) || !strncmp(uri, "vtrash:", 7)) + if (CAMEL_IS_VEE_STORE(store) || !strncmp(uri, "vtrash:", 7) || context == NULL) return; g_assert(pthread_self() == mail_gui_thread); @@ -376,7 +376,7 @@ mail_vfolder_delete_uri(CamelStore *store, const char *uri) CamelVeeFolder *vf; GString *changed; - if (CAMEL_IS_VEE_STORE(store) || !strncmp(uri, "vtrash:", 7)) + if (context == NULL || CAMEL_IS_VEE_STORE(store) || !strncmp(uri, "vtrash:", 7)) return; d(printf("Deleting uri to check: %s\n", uri)); @@ -854,10 +854,15 @@ mail_vfolder_shutdown (void) { g_hash_table_foreach (vfolder_hash, vfolder_foreach_cb, NULL); g_hash_table_destroy (vfolder_hash); - - if (vfolder_store) + vfolder_hash = NULL; + + if (vfolder_store) { camel_object_unref (CAMEL_OBJECT (vfolder_store)); + vfolder_store = NULL; + } - if (context) + if (context) { gtk_object_unref (GTK_OBJECT (context)); + context = NULL; + } } -- cgit v1.2.3