# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1284488469 -10800 # Node ID bf318c0ae8c0fe6828e9661747b90af8051f2468 # Parent e36f3802f7336d97811035ff30365fbf0228f590 Revision: 201033 Kit: 201035 diff -r e36f3802f733 -r bf318c0ae8c0 srsf/nssvascontacthdlr/src/nssvasccontacthandlerimpl.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; diff -r e36f3802f733 -r bf318c0ae8c0 voiceui/pbkinfoviewimpl/src/pbkinfoviewsindhandler.cpp --- 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 ); } // ----------------------------------------------------------------------------