phonebookengines/VirtualPhonebook/VPbkVCardEng/src/CVPbkVCardPropertyExporter.cpp
branchRCL_3
changeset 9 0d28c1c5b6dd
parent 8 5586b4d2ec3e
--- a/phonebookengines/VirtualPhonebook/VPbkVCardEng/src/CVPbkVCardPropertyExporter.cpp	Wed Apr 14 15:45:35 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkVCardEng/src/CVPbkVCardPropertyExporter.cpp	Tue Apr 27 16:23:35 2010 +0300
@@ -732,29 +732,32 @@
     {
     MVPbkStoreContact* tempContact = const_cast<MVPbkStoreContact*>(iContact);
     if( tempContact )
-        {	
+        {
         MVPbkStoreContact2* tempContact2 = 	reinterpret_cast<MVPbkStoreContact2*>
             (tempContact->StoreContactExtension (KMVPbkStoreContactExtension2Uid) );	    
         if(tempContact2)
             {
             MVPbkStoreContactProperties* propreties = tempContact2->PropertiesL();
-            CleanupDeletePushL(propreties);
-            
-            // Convert the last_modified field defined in Contact Model database 
-            // to REV (Revision) field in vCard Specification 2.1
-            CParserPropertyValueDateTime* valueDateTime = 
-            		CreateDateTimePropertyL(
-                		propreties->LastModifiedL(), 
-                		TVersitDateTime::EIsUTC ); 
-            CleanupStack::PopAndDestroy(propreties);
-            
-            CleanupStack::PushL(valueDateTime);
-            CParserProperty* property = 
-            		CParserGroupedProperty::NewL(*valueDateTime, KREV, NULL, NULL);	
-            
-            CleanupStack::PushL( property );            
-            iParser->AddPropertyL(property); //takes ownership
-            CleanupStack::Pop(2);//valueDateTime and property
+            if( propreties )
+                {
+                CleanupDeletePushL(propreties);
+
+                // Convert the last_modified field defined in Contact Model database 
+                // to REV (Revision) field in vCard Specification 2.1
+                CParserPropertyValueDateTime* valueDateTime =
+                        CreateDateTimePropertyL(
+                            propreties->LastModifiedL(),
+                            TVersitDateTime::EIsUTC );
+                CleanupStack::PopAndDestroy(propreties);
+                
+                CleanupStack::PushL(valueDateTime);
+                CParserProperty* property =
+                        CParserGroupedProperty::NewL(*valueDateTime, KREV, NULL, NULL);
+                
+                CleanupStack::PushL( property );
+                iParser->AddPropertyL(property); //takes ownership
+                CleanupStack::Pop(2);//valueDateTime and property
+                }
             }
         }
     }