fixes a crash.

svn path=/trunk/; revision=31556
This commit is contained in:
Chenthill Palanisamy
2006-02-21 11:50:16 +00:00
parent 4c8b124e6b
commit fe28e52052
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2006-02-21 Chenthill Palanisamy <pchenthill@novell.com>
reviewed by Veerapuram Varadhan <vvaradhan@novell.com>
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 <kharish@novell.com>
* icsimporter.c (get_menu_type), (dialog_response_cb),

View File

@ -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);