aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-account-editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-account-editor.c')
-rw-r--r--mail/em-account-editor.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index de0348ff5b..686f8cebcb 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -2141,11 +2141,14 @@ emae_defaults_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
emae_account_entry(emae, "bcc_addrs", E_ACCOUNT_BCC_ADDRS, xml);
gtk_widget_set_sensitive((GtkWidget *)gui->drafts_folder_button, e_account_writable(emae->account, E_ACCOUNT_DRAFTS_FOLDER_URI));
- gtk_widget_set_sensitive((GtkWidget *)gui->sent_folder_button, e_account_writable(emae->account, E_ACCOUNT_SENT_FOLDER_URI)&& !(emae->priv->source.provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER));
+
+ gtk_widget_set_sensitive((GtkWidget *)gui->sent_folder_button, e_account_writable(emae->account, E_ACCOUNT_SENT_FOLDER_URI)
+ && ( emae->priv->source.provider && !(emae->priv->source.provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)));
+
gtk_widget_set_sensitive((GtkWidget *)gui->restore_folders_button,
(e_account_writable(emae->account, E_ACCOUNT_SENT_FOLDER_URI) &&
- ! ( emae->priv->source.provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER))
- || e_account_writable(emae->account, E_ACCOUNT_DRAFTS_FOLDER_URI));
+ ( emae->priv->source.provider && ! ( emae->priv->source.provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)) ||
+ e_account_writable(emae->account, E_ACCOUNT_DRAFTS_FOLDER_URI)));
/* Receipt policy */
emae_setup_receipt_policy (emae, xml);