From ebef4e5ed565ae236aed1e644bd62fb475e928f8 Mon Sep 17 00:00:00 2001 From: Sushma Rai Date: Wed, 28 Sep 2005 13:25:12 +0000 Subject: Fix for the crash when adding duplicate contacts without e-mail ids by dragging them into contact list editor. Patch submitted by "Devashish " svn path=/trunk/; revision=30411 --- addressbook/gui/widgets/eab-contact-display.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'addressbook/gui/widgets/eab-contact-display.c') diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index a925ce72d6..48725d6fcc 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -545,10 +545,13 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac gtk_html_stream_printf (html_stream, "%s: ", _("List Members")); email_list = e_contact_get (contact, E_CONTACT_EMAIL); + for (l = email_list; l; l = l->next) { - char *html = e_text_to_html (l->data, 0); - gtk_html_stream_printf (html_stream, "%s, ", html); - g_free (html); + if (l->data) { + char *html = e_text_to_html (l->data, 0); + gtk_html_stream_printf (html_stream, "%s, ", html); + g_free (html); + } } gtk_html_stream_printf (html_stream, ""); } -- cgit v1.2.3