From 37ffc13dcb735d0863377a71bed3f78adf53d875 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 26 Oct 2000 06:09:47 +0000 Subject: Check for the TO recipient list being NULL and don't send. 2000-10-26 Jeffrey Stedfast * mail-callbacks.c (composer_send_cb): Check for the TO recipient list being NULL and don't send. svn path=/trunk/; revision=6201 --- mail/mail-callbacks.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mail/mail-callbacks.c') diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 1b088fe4df..8cd61f0557 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -281,6 +281,12 @@ composer_send_cb (EMsgComposer *composer, gpointer data) /* Get the message */ message = e_msg_composer_get_message (composer); + /* Check for no recipients */ + if (!camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO)) { + camel_object_unref (CAMEL_OBJECT (message)); + return; + } + /* Check for no subject */ subject = camel_mime_message_get_subject (message); if (subject == NULL || subject[0] == '\0') { -- cgit