From 8534057ff57cc50024fd438e287370191d77b43a Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Mon, 20 Aug 2001 15:57:43 +0000 Subject: Whoops, make sure that the account has a source before removing it or 2001-08-20 Peter Williams * mail-accounts.c (mail_able): Whoops, make sure that the account has a source before removing it or what-have-you. svn path=/trunk/; revision=12310 --- mail/mail-accounts.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mail/mail-accounts.c') diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c index 7a5eec6e19..efdaf2e13e 100644 --- a/mail/mail-accounts.c +++ b/mail/mail-accounts.c @@ -352,10 +352,12 @@ mail_able (GtkButton *button, gpointer data) account = gtk_clist_get_row_data (dialog->mail_accounts, row); account->source->enabled = !account->source->enabled; - if (account->source->enabled) - mail_load_storage_by_uri (dialog->shell, account->source->url, account->name); - else - mail_remove_storage_by_uri (account->source->url); + if (account->source && account->source->url) { + if (account->source->enabled) + mail_load_storage_by_uri (dialog->shell, account->source->url, account->name); + else + mail_remove_storage_by_uri (account->source->url); + } mail_autoreceive_setup (); mail_config_write (); -- cgit v1.2.3