diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-07-26 03:23:20 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-07-26 03:23:20 +0800 |
commit | 66642cda020a8edf6b32de1144d8cd1fbb960855 (patch) | |
tree | 2ab514ac32dafc1e36d8b0bd43057c28e09c7392 | |
parent | 0d27a627858afb85731bd4fec48a5f47c9f68d0f (diff) | |
download | gsoc2013-evolution-66642cda020a8edf6b32de1144d8cd1fbb960855.tar gsoc2013-evolution-66642cda020a8edf6b32de1144d8cd1fbb960855.tar.gz gsoc2013-evolution-66642cda020a8edf6b32de1144d8cd1fbb960855.tar.bz2 gsoc2013-evolution-66642cda020a8edf6b32de1144d8cd1fbb960855.tar.lz gsoc2013-evolution-66642cda020a8edf6b32de1144d8cd1fbb960855.tar.xz gsoc2013-evolution-66642cda020a8edf6b32de1144d8cd1fbb960855.tar.zst gsoc2013-evolution-66642cda020a8edf6b32de1144d8cd1fbb960855.zip |
Make sure that the url isn't an empty string and also make sure to free it
2002-07-25 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (composer_send_cb): Make sure that the url
isn't an empty string and also make sure to free it when we're
done with it. Also check that we got the folder - if it is NULL,
then just abort.
svn path=/trunk/; revision=17593
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/mail-callbacks.c | 14 |
2 files changed, 16 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index e44ae3905f..73e03d7740 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2002-07-25 Jeffrey Stedfast <fejj@ximian.com> + + * mail-callbacks.c (composer_send_cb): Make sure that the url + isn't an empty string and also make sure to free it when we're + done with it. Also check that we got the folder - if it is NULL, + then just abort. + 2002-07-24 Jeffrey Stedfast <fejj@ximian.com> * mail-config.c (mail_config_folder_to_safe_url): Use diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index c2f63a5202..86f84ea739 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -524,14 +524,22 @@ composer_send_cb (EMsgComposer *composer, gpointer user_data) char *url; url = e_msg_composer_hdrs_get_post_to ((EMsgComposerHdrs *) composer->hdrs); - if (url != NULL) { + if (url && *url) { post = TRUE; + mail_msg_wait (mail_get_folder (url, 0, got_post_folder, &folder, mail_thread_new)); + + if (!folder) { + g_free (url); + return; + } } else { folder = outbox_folder; camel_object_ref (folder); } + g_free (url); + message = composer_get_message (composer, post, FALSE); if (!message) return; @@ -554,10 +562,6 @@ composer_send_cb (EMsgComposer *composer, gpointer user_data) e_msg_composer_set_enable_autosave (composer, FALSE); - if (post) { - - } - mail_append_mail (folder, message, info, composer_send_queued_cb, send); camel_object_unref (message); camel_object_unref (folder); |