omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp
changeset 54 13ecdfc9a581
parent 46 38e18a8b16c7
--- a/omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp	Fri Aug 20 09:35:25 2010 +0530
+++ b/omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp	Fri Sep 03 17:34:04 2010 +0530
@@ -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 );