aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-session-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/e-mail-session-utils.c')
-rw-r--r--mail/e-mail-session-utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mail/e-mail-session-utils.c b/mail/e-mail-session-utils.c
index b307fdc15c..ae9bd96a39 100644
--- a/mail/e-mail-session-utils.c
+++ b/mail/e-mail-session-utils.c
@@ -406,7 +406,12 @@ mail_session_send_to_thread (GSimpleAsyncResult *simple,
service = camel_session_get_service (
CAMEL_SESSION (session), context->transport_uid);
- g_return_if_fail (CAMEL_IS_TRANSPORT (service));
+ if (!CAMEL_IS_TRANSPORT (service)) {
+ g_simple_async_result_set_error (simple,
+ CAMEL_SERVICE_ERROR, CAMEL_SERVICE_ERROR_URL_INVALID,
+ _("Cannot get transport service for account '%s'"), context->transport_uid);
+ return;
+ }
/* XXX This API does not allow for cancellation. */
if (!camel_service_connect_sync (service, &error)) {