Added checking for return value on summary and description.

Fixes the crash for bug 239435:
VCS file from EBay crashes Calendar
This commit is contained in:
mostafah%oeone.com 2004-09-15 19:28:11 +00:00
Родитель d7c22781c1
Коммит bcb7ebfb53
1 изменённых файлов: 3 добавлений и 5 удалений

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

@ -1849,17 +1849,15 @@ bool oeICalEventImpl::ParseIcalComponent( icalcomponent *comp )
//title
prop = icalcomponent_get_first_property( vevent, ICAL_SUMMARY_PROPERTY );
if ( prop != 0) {
tmpstr = icalproperty_get_summary( prop );
if ( prop != 0 && (tmpstr = icalproperty_get_summary( prop ) ) ) {
SetTitle( nsDependentCString( strForceUTF8( tmpstr ) ) );
} else if( !m_title.IsEmpty() ) {
m_title.Truncate();
m_title.Truncate();
}
//description
prop = icalcomponent_get_first_property( vevent, ICAL_DESCRIPTION_PROPERTY );
if ( prop != 0) {
tmpstr = icalproperty_get_description( prop );
if ( prop != 0 && (tmpstr = icalproperty_get_description( prop ) ) ) {
SetDescription( nsDependentCString( strForceUTF8( tmpstr ) ) );
} else if( !m_description.IsEmpty() ) {
m_description.Truncate();