From d6c5e8db0d5d179a552cde5f7add078a70d521d6 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 9 Aug 2002 18:54:45 +0000 Subject: Handle the fact that ccd may be NULL (if the composer was created via * mail-callbacks.c (composer_send_queued_cb, save_draft_done): Handle the fact that ccd may be NULL (if the composer was created via CORBA). Quick temporary fix for sending meeting requests. svn path=/trunk/; revision=17754 --- mail/ChangeLog | 10 ++++++++-- mail/mail-callbacks.c | 10 +++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 83a94b7950..714c5ed7ba 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,8 +1,14 @@ +2002-08-09 Dan Winship + + * mail-callbacks.c (composer_send_queued_cb, save_draft_done): + Handle the fact that ccd may be NULL (if the composer was created + via CORBA). Quick temporary fix for sending meeting requests. + 2002-08-09 Peter Williams * mail-config.c (mail_config_uri_renamed): When a URI is changed, - try to copy over threaded view settings, preview pane shown settings, - headers, hide state, tree expansion, and GAL view files. + try to copy over threaded view settings, preview pane shown + settings, headers, hide state, tree expansion, and GAL view files. (uri_to_evname): New utility function. 2002-08-08 Jeffrey Stedfast diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 4f42b1207c..0fa94b7f9d 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -363,7 +363,7 @@ composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessag ccd = send->ccd; if (queued) { - if (ccd->drafts_folder) { + if (ccd && ccd->drafts_folder) { /* delete the old draft message */ camel_folder_set_message_flags (ccd->drafts_folder, ccd->drafts_uid, CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN, @@ -374,7 +374,7 @@ composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessag ccd->drafts_uid = NULL; } - if (ccd->folder) { + if (ccd && ccd->folder) { /* set any replied flags etc */ camel_folder_set_message_flags (ccd->folder, ccd->uid, ccd->flags, ccd->set); camel_object_unref (ccd->folder); @@ -614,7 +614,7 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i ccd = sdi->ccd; - if (ccd->drafts_folder) { + if (ccd && ccd->drafts_folder) { /* delete the original draft message */ camel_folder_set_message_flags (ccd->drafts_folder, ccd->drafts_uid, CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN, @@ -625,7 +625,7 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i ccd->drafts_uid = NULL; } - if (ccd->folder) { + if (ccd && ccd->folder) { /* set the replied flags etc */ camel_folder_set_message_flags (ccd->folder, ccd->uid, ccd->flags, ccd->set); camel_object_unref (ccd->folder); @@ -634,7 +634,7 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i ccd->uid = NULL; } - if (appended_uid) { + if (ccd && appended_uid) { camel_object_ref (folder); ccd->drafts_folder = folder; ccd->drafts_uid = g_strdup (appended_uid); -- cgit