Revision: 201033 RCL_3 PDK_3.0.3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 14 Sep 2010 21:21:09 +0300
branchRCL_3
changeset 20 bf318c0ae8c0
parent 19 e36f3802f733
Revision: 201033 Kit: 201035
srsf/nssvascontacthdlr/src/nssvasccontacthandlerimpl.cpp
voiceui/pbkinfoviewimpl/src/pbkinfoviewsindhandler.cpp
--- a/srsf/nssvascontacthdlr/src/nssvasccontacthandlerimpl.cpp	Wed Sep 01 12:29:17 2010 +0100
+++ b/srsf/nssvascontacthdlr/src/nssvasccontacthandlerimpl.cpp	Tue Sep 14 21:21:09 2010 +0300
@@ -1522,16 +1522,25 @@
             }
         }
         
-    TRAPD( err, // trapping is a fix to make the function non-leaving
+//    TRAPD( err, // trapping is a fix to make the function non-leaving
 
 	    // Add the tags to the to-be-deleted list.
 	    // (there are 1 or 2 tags in aTagList depending on
 	    //  whether nickname is also there or not)
-	    for ( TInt k( 0 ); k < aTagList->Count(); k++ )
+	    TRAPD(err,
+		for ( TInt k( 0 ); k < aTagList->Count(); k++ )
 	        {
 	        iDeleteTagListArray->AppendL( (*aTagList)[k] );
 	        }
-
+			);
+		if ( err != KErrNone )
+			{
+			// Destroy tag list
+	    	aTagList->Reset();
+	    	delete aTagList;
+	    	aTagList = 0;
+	        return;
+			}
 	    // We have processed this ID
 	    RUBY_DEBUG1( "CNssContactHandlerImplementation::DoRemoveNamesAfterGetTagList Before removal. iDelList.Count [%d]", iDelList.Count() );
 	    if( iDelList.Count() > 0 ) 
@@ -1571,11 +1580,11 @@
 	        RUBY_DEBUG0( "DoRemoveNamesAfterGetTagList Moving to the next phase" );
 	        DoRemoveNamesCallDeleteTag();
 	        }
-        );  // TRAPD
-        if( err != KErrNone ) 
-        	{
-        	RUBY_ERROR1( "CNssContactHandlerImplementation::DoRemoveNamesAfterGetTagList Leaves with [%d] inside", err );
-        	}
+//        );  // TRAPD
+//        if( err != KErrNone ) 
+//        	{
+//        	RUBY_ERROR1( "CNssContactHandlerImplementation::DoRemoveNamesAfterGetTagList Leaves with [%d] inside", err );
+//        	}
 		// Destroy tag list
 	    aTagList->Reset();
 	    delete aTagList;
--- a/voiceui/pbkinfoviewimpl/src/pbkinfoviewsindhandler.cpp	Wed Sep 01 12:29:17 2010 +0100
+++ b/voiceui/pbkinfoviewimpl/src/pbkinfoviewsindhandler.cpp	Tue Sep 14 21:21:09 2010 +0300
@@ -356,9 +356,17 @@
     HBufC* contact = NULL;
     HBufC* type = NULL;
     TRAPD( err, contact = iTagArray[aIndex]->SpeechItem()->PartialTextL( KNameTrainingIndex ) );
-    if ( err != KErrNone && err != KErrNotFound) User::Leave( err ); 
-    TRAPD( err2, iTagArray[aIndex]->SpeechItem()->PartialTextL( KExtensionTrainingIndex ) );
-    if ( err2 != KErrNone && err2 != KErrNotFound) User::Leave( err2 );
+    if ( err != KErrNone && err != KErrNotFound) 
+        {
+        User::Leave( err );
+        }
+    CleanupStack::PushL( contact );
+    TRAPD( err2, type = iTagArray[aIndex]->SpeechItem()->PartialTextL( KExtensionTrainingIndex ) );
+    if ( err2 != KErrNone && err2 != KErrNotFound) 
+        {
+        User::Leave( err2 );
+        }
+    CleanupStack::PushL( type );
 
     // fetch whole tts string 
     const TDesC& text = iTagArray[aIndex]->SpeechItem()->Text();
@@ -441,6 +449,7 @@
         // if there is only one part (contact), play normally
         iTagArray[aIndex]->SpeechItem()->PlayL( this );
         }
+    CleanupStack::PopAndDestroy( 2,contact );
     }
     
 // ----------------------------------------------------------------------------