syncmlfw/common/sosserver/src/nsmlsoshandler.cpp
branchRCL_3
changeset 26 19bba8228ff0
parent 25 b183ec05bd8c
--- a/syncmlfw/common/sosserver/src/nsmlsoshandler.cpp	Tue Aug 31 16:04:06 2010 +0300
+++ b/syncmlfw/common/sosserver/src/nsmlsoshandler.cpp	Wed Sep 01 12:27:42 2010 +0100
@@ -813,19 +813,26 @@
     CNSmlDMSettings* settings = CNSmlDMSettings::NewLC();
     CNSmlDMProfile* prof = settings->ProfileL( iCurrentJob->ProfileId() );
     if(prof)
-    	{
-      	CleanupStack::PushL( prof );    
-    		if ( iCurrentJob->iPending || prof->IntValue( EDMProfileHidden ))
         {
-        	syncInit = EServerAlerted;
+        CleanupStack::PushL( prof );
+	    }
+    
+    if ( iCurrentJob->iPending || prof->IntValue( EDMProfileHidden ))
+        {
+        syncInit = EServerAlerted;
         }
 
-    		if ( !iCurrentJob->TransportId() )
-        {        
-           iCurrentJob->SetTransportId( prof->IntValue( EDMProfileTransportId ) );
+    if ( !iCurrentJob->TransportId() )
+        {
+        if ( prof )
+            {
+            iCurrentJob->SetTransportId( prof->IntValue( EDMProfileTransportId ) );
+            }
         }
+    if(prof)
+        {
         CleanupStack::PopAndDestroy( prof );
-      }
+        }
     CleanupStack::PopAndDestroy( settings );