From fe28e52052ee8fef8865f2f0dc064f4e95009c32 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Tue, 21 Feb 2006 11:50:16 +0000 Subject: fixes a crash. svn path=/trunk/; revision=31556 --- plugins/import-ics-attachments/ChangeLog | 9 +++++++++ plugins/import-ics-attachments/icsimporter.c | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'plugins/import-ics-attachments') diff --git a/plugins/import-ics-attachments/ChangeLog b/plugins/import-ics-attachments/ChangeLog index 35fbc52e90..f4307a0ac2 100644 --- a/plugins/import-ics-attachments/ChangeLog +++ b/plugins/import-ics-attachments/ChangeLog @@ -1,3 +1,12 @@ +2006-02-21 Chenthill Palanisamy + + reviewed by Veerapuram Varadhan + + Fixes a crash + * icsimporter.c: (org_gnome_evolution_import_ics_attachments): + If the number of attachments selected is not equal to one, just return; + + 2006-01-22 Harish Krishnaswamy * icsimporter.c (get_menu_type), (dialog_response_cb), diff --git a/plugins/import-ics-attachments/icsimporter.c b/plugins/import-ics-attachments/icsimporter.c index 40c5a02ddd..4e755799b3 100644 --- a/plugins/import-ics-attachments/icsimporter.c +++ b/plugins/import-ics-attachments/icsimporter.c @@ -93,11 +93,12 @@ void org_gnome_evolution_import_ics_attachments (EPlugin *ep, EMPopupTargetAttac { GSList *menus = NULL; icalcomponent_kind kind; - int len; + int len = 0; int i = 0; len = g_slist_length(t->attachments); - if (!camel_content_type_is(((CamelDataWrapper *) ((EAttachment *) t->attachments->data)->body)->mime_type, "text", "calendar") || len >1) + + if (len !=1 || !camel_content_type_is(((CamelDataWrapper *) ((EAttachment *) t->attachments->data)->body)->mime_type, "text", "calendar")) return; kind = get_menu_type (t); -- cgit v1.2.3