--- 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 );
}
// ----------------------------------------------------------------------------