--- a/calendarui/editors/src/calendbfield.cpp Tue May 11 16:12:24 2010 +0300
+++ b/calendarui/editors/src/calendbfield.cpp Tue May 25 12:41:10 2010 +0300
@@ -304,7 +304,16 @@
RPointerArray<CCalCalendarInfo> calendarInfoList;
iServices->GetAllCalendarInfoL(calendarInfoList);
CleanupClosePushL( calendarInfoList );
- TInt pos = iDbNamesTextValues->CurrentValueIndex();
+ TInt pos;
+ if( calendarInfoList.Count() == 1 )
+ {
+ pos = 0;
+ }
+ else
+ {
+ pos = iDbNamesTextValues->CurrentValueIndex();
+ }
+
HBufC* calendarFileName = calendarInfoList[pos]->FileNameL().AllocLC();
iCurrentColId = iServices->SessionL(*calendarFileName).CollectionIdL();
CleanupStack::PopAndDestroy(calendarFileName);