syncmlfw/ds/syncagent/src/nsmldscontent.cpp
branchRCL_3
changeset 26 19bba8228ff0
parent 25 b183ec05bd8c
--- a/syncmlfw/ds/syncagent/src/nsmldscontent.cpp	Tue Aug 31 16:04:06 2010 +0300
+++ b/syncmlfw/ds/syncagent/src/nsmldscontent.cpp	Wed Sep 01 12:27:42 2010 +0100
@@ -120,7 +120,7 @@
 //
 TBool CNSmlDSContent::ContentIndexIsSet() const
 	{
-	if ( iIndex == -1 )
+	if ( ( iIndex < 0 ) || ( iIndex >= iStores.Count() ) )
 		{
 		return EFalse;
 		}
@@ -2476,7 +2476,13 @@
 	DBG_FILE(_S8("CNSmlDSContent::PackupRequestL begins"));
 	RMutex mutex;
 	if(mutex.OpenGlobal( KNSmlDSContentAtomicOperationName ) != KErrNone )
-		mutex.CreateGlobal( KNSmlDSContentAtomicOperationName );
+	    {
+		TRAPD(err, mutex.CreateGlobal( KNSmlDSContentAtomicOperationName ));
+		if(err != KErrNone)
+		    {
+            return;
+		    }
+	    }
 	mutex.Wait();
 	SaveMapInfoL( aAnchor );
 	mutex.Signal();