Fixed bug 152274: Calling fetchEvent with null parameter crashes Mozilla

This commit is contained in:
mostafah%oeone.com 2002-06-17 12:42:24 +00:00
parent 3327303fbe
commit cdda83d729

View File

@ -971,6 +971,15 @@ NS_IMETHODIMP oeICalImpl::FetchEvent( const char *id, oeIICalEvent **ev)
#ifdef ICAL_DEBUG_ALL
printf( "oeICalImpl::FetchEvent()\n" );
#endif
if( id == nsnull ) {
#ifdef ICAL_DEBUG
printf( "oeICalImpl::FetchEvent() - Invalid Id.\n" );
#endif
*ev = nsnull;
return NS_OK;
}
oeIICalEvent* event = m_eventlist.GetEventById( id );
if( event != nsnull ) {
event->AddRef();