-rw-r--r-- | korganizer/komonthview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 7927307..8ee1363 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -749,49 +749,49 @@ int MonthViewCell::insertEvent(Event *event) item->setPalette( pal ); item->setRecur( event->recurrence()->doesRecur() ); item->setAlarm( event->isAlarmEnabled() && multiday < 2 ); item->setMoreInfo( event->description().length() > 0 ); #ifdef DESKTOP_VERSION Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails, KOPrefs::instance()->email()); if ( me != 0 ) { if ( me->status() == Attendee::NeedsAction && me->RSVP()) item->setReply(true && multiday < 2); else item->setReply(false); } else item->setReply(false); #endif item->setMultiDay( multiday ); if ( multiday ) { insertItem( item ,mdayCount); ++mdayCount; } else { uint i; int pos = mdayCount; for ( i = mdayCount; i < count();++i ) { QListBoxItem* it = this->item ( i ); - if ( text < it->text() ) { + if ( it && text < it->text() ) { pos = i; break; } ++pos; } insertItem( item ,pos); } if ( useToolTips ) { mToolTip.append( mToolTipText ); } return mdayCount; } void MonthViewCell::insertTodo(Todo *todo) { setFocusPolicy(WheelFocus); QString text; if (todo->hasDueDate()) { if (!todo->doesFloat()) { text += KGlobal::locale()->formatTime(todo->dtDue().time()); text += " "; } } text += todo->summary(); MonthViewItem *item ; |