bug 335879: treat unknown timezones as floating, to prevent the app from dying. r=dmose

This commit is contained in:
mvl%exedo.nl 2006-05-04 18:29:33 +00:00
Родитель 45dcdd4f62
Коммит 55e6b6e7fc
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -626,8 +626,15 @@ calDateTime::GetIcalTZ(const nsACString& tzid, struct _icaltimezone **tzp)
nsCOMPtr<calIIcalComponent> tz; nsCOMPtr<calIIcalComponent> tz;
nsresult rv = ics->GetTimezone(tzid, getter_AddRefs(tz)); nsresult rv = ics->GetTimezone(tzid, getter_AddRefs(tz));
if (NS_FAILED(rv) || !tz) if (NS_FAILED(rv) || !tz) {
return NS_ERROR_INVALID_ARG; // No timezone was found. To prevent the app from dying,
// pretent that there is no timezone, ie return floating.
// See bug 335879
*tzp = nsnull;
return NS_OK;
// We should return an error, but don't:
//return NS_ERROR_INVALID_ARG;
}
if (tzp) { if (tzp) {
icalcomponent *zonecomp = tz->GetIcalComponent(); icalcomponent *zonecomp = tz->GetIcalComponent();