diff -r b1f0785c289d -r 4f501b74aeb1 messagingapp/msgui/unifiededitor/src/msgunieditorbody.cpp --- a/messagingapp/msgui/unifiededitor/src/msgunieditorbody.cpp Tue Jul 13 22:09:22 2010 +0530 +++ b/messagingapp/msgui/unifiededitor/src/msgunieditorbody.cpp Sun Jul 25 18:59:19 2010 +0530 @@ -545,11 +545,14 @@ if( mImageSize || mTextEdit->toPlainText().size() || mAudioSize || mVideoSize ) { - UniEditorGenUtils* uniEditorGenUtils = new UniEditorGenUtils; + + UniEditorGenUtils* genUtils = NULL; + QT_TRAP_THROWING(genUtils = new UniEditorGenUtils); + bodysize += mImageSize + mAudioSize + mVideoSize + - uniEditorGenUtils->UTF8Size(mTextEdit->toPlainText()) + + genUtils->UTF8Size(mTextEdit->toPlainText()) + KEstimatedMimeHeaderSize + KEstimatedMmsSmilHeaderSize; - delete uniEditorGenUtils; + delete genUtils; } return bodysize; }