diff options
-rw-r--r-- | mail/ChangeLog | 9 | ||||
-rw-r--r-- | mail/mail-config.c | 18 | ||||
-rw-r--r-- | mail/message-list.c | 2 |
3 files changed, 25 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 371f94eb7f..031095076b 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2001-07-09 Peter Williams <peterw@ximian.com> + + * mail-config.c (mail_config_write): Some NULL protection for our strings: + pgp_key, html_signature, smime_key. Probably we should do this for all + strings. Either that or change Bonobo Config. + + * message-list.c (message_list_init): Explicitly initialize search to NULL. + Bug 3951 might to be due to a problem wrt this, and it can't hurt. + 2001-07-09 Dan Winship <danw@ximian.com> * mail-display.c (save_part): g_strdup the result of diff --git a/mail/mail-config.c b/mail/mail-config.c index 90210e26e8..de98723925 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -605,7 +605,10 @@ mail_config_write (void) /* account pgp options */ path = g_strdup_printf ("/Mail/Accounts/account_pgp_key_%d", i); - bonobo_config_set_string (config->db, path, account->pgp_key, NULL); + if (account->pgp_key) + bonobo_config_set_string (config->db, path, account->pgp_key, NULL); + else + bonobo_config_set_string (config->db, path, "", NULL); g_free (path); path = g_strdup_printf ("/Mail/Accounts/account_pgp_encrypt_to_self_%d", i); @@ -615,8 +618,12 @@ mail_config_write (void) /* account s/mime options */ path = g_strdup_printf ("/Mail/Accounts/account_smime_key_%d", i); - bonobo_config_set_string (config->db, path, - account->smime_key, NULL); + if (account->smime_key) + bonobo_config_set_string (config->db, path, + account->smime_key, NULL); + else + bonobo_config_set_string (config->db, path, + "", NULL); g_free (path); path = g_strdup_printf ("/Mail/Accounts/account_smime_encrypt_to_self_%d", i); @@ -646,7 +653,10 @@ mail_config_write (void) account->id->signature, NULL); g_free (path); path = g_strdup_printf ("identity_html_signature_%d", i); - bonobo_config_set_string (config->db, path, account->id->html_signature, NULL); + if (account->id->html_signature) + bonobo_config_set_string (config->db, path, account->id->html_signature, NULL); + else + bonobo_config_set_string (config->db, path, "", NULL); g_free (path); path = g_strdup_printf ("identity_has_html_signature_%d", i); bonobo_config_set_boolean (config->db, path, account->id->has_html_signature, NULL); diff --git a/mail/message-list.c b/mail/message-list.c index 92db0ff66f..c5f19abe9e 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -1084,6 +1084,8 @@ message_list_init (GtkObject *object) message_list->hide_before = ML_HIDE_NONE_START; message_list->hide_after = ML_HIDE_NONE_END; + message_list->search = NULL; + message_list->hide_lock = g_mutex_new(); message_list->uid_nodemap = g_hash_table_new (g_str_hash, g_str_equal); |