diff options
author | Milan Crha <mcrha@redhat.com> | 2012-06-19 19:41:02 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-06-19 19:42:09 +0800 |
commit | 1cf93ca25ec050edde2dcf71d564614fc9f28a22 (patch) | |
tree | 0e778c2a2c72ffa63d150b3265864721287c8b49 | |
parent | baa4fca60b18fafeaf14fe8226e5c0c5f94e2ede (diff) | |
download | gsoc2013-evolution-1cf93ca25ec050edde2dcf71d564614fc9f28a22.tar gsoc2013-evolution-1cf93ca25ec050edde2dcf71d564614fc9f28a22.tar.gz gsoc2013-evolution-1cf93ca25ec050edde2dcf71d564614fc9f28a22.tar.bz2 gsoc2013-evolution-1cf93ca25ec050edde2dcf71d564614fc9f28a22.tar.lz gsoc2013-evolution-1cf93ca25ec050edde2dcf71d564614fc9f28a22.tar.xz gsoc2013-evolution-1cf93ca25ec050edde2dcf71d564614fc9f28a22.tar.zst gsoc2013-evolution-1cf93ca25ec050edde2dcf71d564614fc9f28a22.zip |
Avoid crash for providers without configuration backend
-rw-r--r-- | mail/e-mail-config-notebook.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mail/e-mail-config-notebook.c b/mail/e-mail-config-notebook.c index 70f790dd3f..5d04c47e01 100644 --- a/mail/e-mail-config-notebook.c +++ b/mail/e-mail-config-notebook.c @@ -356,23 +356,23 @@ mail_config_notebook_constructed (GObject *object) G_BINDING_SYNC_CREATE); } - provider = e_mail_config_service_backend_get_provider (backend); + provider = backend ? e_mail_config_service_backend_get_provider (backend) : NULL; /*** Receiving Options (conditional) ***/ /* Note: We exclude this page if it has no options, * but we don't know that until we create it. */ - page = e_mail_config_provider_page_new (backend); - if (e_mail_config_provider_page_is_empty ( + page = backend ? e_mail_config_provider_page_new (backend) : NULL; + if (page && e_mail_config_provider_page_is_empty ( E_MAIL_CONFIG_PROVIDER_PAGE (page))) { g_object_unref (g_object_ref_sink (page)); - } else { + } else if (page) { e_mail_config_notebook_add_page (notebook, page); } /*** Sending Page (conditional) ***/ - if (!CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (provider)) { + if (provider && !CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (provider)) { page = e_mail_config_sending_page_new (registry); e_mail_config_service_page_add_scratch_source ( E_MAIL_CONFIG_SERVICE_PAGE (page), |