aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-store.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-08-26 16:30:50 +0800
committerMilan Crha <mcrha@redhat.com>2011-08-26 16:30:50 +0800
commitaf690e79a1c7ec7caa2f9c661bd1bd3f709a3e30 (patch)
treebfae0be7adf7db828ca4a28371f773d3221a11ac /mail/e-mail-store.c
parenteab1c5b25236e6127bd1f42a87dd2851a40792f8 (diff)
downloadgsoc2013-evolution-af690e79a1c7ec7caa2f9c661bd1bd3f709a3e30.tar
gsoc2013-evolution-af690e79a1c7ec7caa2f9c661bd1bd3f709a3e30.tar.gz
gsoc2013-evolution-af690e79a1c7ec7caa2f9c661bd1bd3f709a3e30.tar.bz2
gsoc2013-evolution-af690e79a1c7ec7caa2f9c661bd1bd3f709a3e30.tar.lz
gsoc2013-evolution-af690e79a1c7ec7caa2f9c661bd1bd3f709a3e30.tar.xz
gsoc2013-evolution-af690e79a1c7ec7caa2f9c661bd1bd3f709a3e30.tar.zst
gsoc2013-evolution-af690e79a1c7ec7caa2f9c661bd1bd3f709a3e30.zip
Bug #657310 - Crash when editing transport-only accounts
Diffstat (limited to 'mail/e-mail-store.c')
-rw-r--r--mail/e-mail-store.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mail/e-mail-store.c b/mail/e-mail-store.c
index 873c47d33e..7c79e1ca54 100644
--- a/mail/e-mail-store.c
+++ b/mail/e-mail-store.c
@@ -275,12 +275,17 @@ e_mail_store_add_by_account (EMailSession *session,
CamelService *service = NULL;
CamelProvider *provider;
CamelURL *url;
- gboolean skip;
+ gboolean skip, transport_only;
GError *error = NULL;
g_return_val_if_fail (E_IS_MAIL_SESSION (session), NULL);
g_return_val_if_fail (E_IS_ACCOUNT (account), NULL);
+ /* check whether it's transport-only accounts */
+ transport_only = !account->source || !account->source->url || !*account->source->url;
+ if (transport_only)
+ goto handle_transport;
+
/* Load the service, but don't connect. Check its provider,
* and if this belongs in the folder tree model, add it. */
@@ -326,6 +331,9 @@ handle_transport:
}
}
+ if (transport_only)
+ return NULL;
+
if (!CAMEL_IS_STORE (service))
goto fail;