Added checking for return value on summary and description.

Fixes the crash for bug 239435:
VCS file from EBay crashes Calendar


git-svn-id: svn://10.0.0.236/trunk@162396 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mostafah%oeone.com 2004-09-15 19:28:11 +00:00
parent d21c91db6d
commit 65c4d722d6

View File

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