diff options
-rw-r--r-- | mail/ChangeLog | 9 | ||||
-rw-r--r-- | mail/em-format-hook.c | 2 | ||||
-rw-r--r-- | mail/em-format.c | 5 |
3 files changed, 14 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 4b7e06cbf2..2061234d1a 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2004-11-11 Radek Doulik <rodo@ximian.com> + + * em-format-hook.c (emfh_enable): l = g_list_next (l); in inner + loop instead of g = g_list_next (l).. probably typo after c'n'p + + * em-format.c (em_format_class_remove_handler): in case the old + handler doesn't exist, remove 'info' handler from type_handler + table + 2004-11-03 Not Zed <NotZed@Ximian.com> * em-folder-view.c (emfv_popup): Fix the popup id. diff --git a/mail/em-format-hook.c b/mail/em-format-hook.c index d88323e348..9748dc8088 100644 --- a/mail/em-format-hook.c +++ b/mail/em-format-hook.c @@ -207,7 +207,7 @@ emfh_enable(EPluginHook *eph, int state) struct _EMFormatHookGroup *group = g->data; klass = g_hash_table_lookup(emfh_types, group->id); - for (l=group->items;l;g=g_slist_next(l)) { + for (l=group->items;l;l=g_slist_next(l)) { EMFormatHookItem *item = l->data; if (state) diff --git a/mail/em-format.c b/mail/em-format.c index 73bba36e57..21b87d102c 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -239,7 +239,10 @@ em_format_class_remove_handler(EMFormatClass *emfc, EMFormatHandler *info) current = g_hash_table_lookup(emfc->type_handlers, info->mime_type); if (current == info) { current = info->old; - g_hash_table_insert(emfc->type_handlers, current->mime_type, current); + if (current) + g_hash_table_insert(emfc->type_handlers, current->mime_type, current); + else + g_hash_table_remove(emfc->type_handlers, info->mime_type); } else { while (current && current->old != info) current = current->old; |