--- a/mobilemessaging/unieditor/model/src/UniTextObject.cpp Wed Mar 31 21:25:02 2010 +0300
+++ b/mobilemessaging/unieditor/model/src/UniTextObject.cpp Wed Apr 14 15:53:21 2010 +0300
@@ -370,12 +370,15 @@
{
if ( iTextEditor && iTextEditor->Text()->DocumentLength() )
{
- TPtrC ptr = iTextEditor->Text()->Read( 0, KMaxFilenameLenghtForAttachment );
+ HBufC *ptr = iTextEditor->GetTextInHBufL();
+ CleanupStack::PushL( ptr );
MsgAttachmentUtils::GetFileNameFromBuffer(
aFileName,
- ptr,
+ *ptr,
KMaxFilenameLenghtForAttachment,
&KExtTextPlain_16 );
+ CleanupStack::PopAndDestroy( ptr );
+
}
if ( aFileName.Length() == 0 ||
!iFs.IsValidName( aFileName ) )