aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-callbacks.c14
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);