diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2005-02-04 02:38:28 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2005-02-04 02:38:28 +0800 |
commit | b306386ca00651aad196dbbe515f20e78a13ffad (patch) | |
tree | 763e2dcebdfe8ded07ff534895695932ace3991f /mail | |
parent | 7d53380f5c915ac4155e7d87a25cc802e4771053 (diff) | |
download | gsoc2013-evolution-b306386ca00651aad196dbbe515f20e78a13ffad.tar.gz gsoc2013-evolution-b306386ca00651aad196dbbe515f20e78a13ffad.tar.zst gsoc2013-evolution-b306386ca00651aad196dbbe515f20e78a13ffad.zip |
Use g_hash_table_foreach_remove() instead so the keys don't point to
2005-02-03 Jeffrey Stedfast <fejj@novell.com>
* message-list.c (message_list_set_folder): Use
g_hash_table_foreach_remove() instead so the keys don't point to
free'd values.
(normalised_free): Return TRUE.
svn path=/trunk/; revision=28696
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/message-list.c | 8 |
2 files changed, 12 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 2b7c05643a..6bf5c13249 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2005-02-03 Jeffrey Stedfast <fejj@novell.com> + + * message-list.c (message_list_set_folder): Use + g_hash_table_foreach_remove() instead so the keys don't point to + free'd values. + (normalised_free): Return TRUE. + 2005-02-02 Rodney Dawes <dobey@novell.com> * em-subscribe-editor.c (em_subscribe_editor_new): Use the diff --git a/mail/message-list.c b/mail/message-list.c index f5e3c4213e..59c08cc3ce 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -1846,10 +1846,12 @@ message_list_init (MessageList *message_list) g_signal_connect (((GtkScrolledWindow *) message_list)->vscrollbar, "value-changed", G_CALLBACK (ml_scrolled), message_list); } -static void +static gboolean normalised_free (gpointer key, gpointer value, gpointer user_data) { e_poolv_destroy (value); + + return TRUE; } static void @@ -1917,7 +1919,7 @@ message_list_finalise (GObject *object) MessageList *message_list = MESSAGE_LIST (object); struct _MessageListPrivate *p = message_list->priv; - g_hash_table_foreach (message_list->normalised_hash, normalised_free, NULL); + g_hash_table_foreach (message_list->normalised_hash, (GHFunc) normalised_free, NULL); g_hash_table_destroy (message_list->normalised_hash); if (message_list->thread_tree) @@ -2805,7 +2807,7 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c } /* reset the normalised sort performance hack */ - g_hash_table_foreach (message_list->normalised_hash, normalised_free, NULL); + g_hash_table_foreach_remove (message_list->normalised_hash, normalised_free, NULL); mail_regen_cancel(message_list); |