omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp
changeset 60 ef2733361cdb
parent 49 392bf116d9ed
--- a/omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp	Thu Sep 02 20:16:30 2010 +0300
+++ b/omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp	Fri Sep 17 08:27:35 2010 +0300
@@ -1395,6 +1395,16 @@
 		           Multiple items are not supported: END");
         User::Leave( KErrNotSupported );
 	    }
+		
+	// Check the validity of the calentry	
+	CCalEntry* arrayentry = rdArray[0];
+	if ( !arrayentry ) 
+		{
+		CleanupStack::PopAndDestroy( 2 ); // rdArray, readStream
+		_DBG_FILE("CNSmlAgendaDataStore::DoCommitCreateItemL - \
+		           Invalid Calentry: END");
+		User::Leave( KErrGeneral );
+		}		
 	    
     TInt err( KErrNone );
 
@@ -1595,6 +1605,16 @@
 		           Multiple items are not supported: END");
         User::Leave( KErrNotSupported );
 	    }
+		
+	// Check the validity of the calentry	
+	CCalEntry* arrayentry = rdArray[0];
+	if ( !arrayentry ) 
+		{
+		CleanupStack::PopAndDestroy( 2 ); // rdArray, readStream
+		_DBG_FILE("CNSmlAgendaDataStore::DoCommitCreateItemL - \
+		           Invalid Calentry: END");
+		User::Leave( KErrGeneral );
+		}
 	    
 	TInt err( KErrNone );