mobilemessaging/unieditor/application/src/UniEditorSaveOperation.cpp
changeset 5 4697dfb2d7ad
parent 2 0bf1d54f37d9
--- a/mobilemessaging/unieditor/application/src/UniEditorSaveOperation.cpp	Tue Jan 26 11:55:08 2010 +0200
+++ b/mobilemessaging/unieditor/application/src/UniEditorSaveOperation.cpp	Tue Feb 02 00:08:43 2010 +0200
@@ -663,9 +663,12 @@
         length = subject.Length();     
         // Saving as pure text from the editor which may contain emoticons.
         HBufC *text = iHeader.SubjectControl()->Editor().GetTextInHBufL();
+        if(text)
+            {
         CleanupStack::PushL( text );
         description.Copy( text->Ptr(), length );
         CleanupStack::PopAndDestroy( text );
+            
        
 
         while( length-- )
@@ -677,6 +680,11 @@
         description.Trim();
         return description.AllocL();
         }
+        else
+         {
+            return KNullDesC().AllocL();
+            }
+        }
         
     return NULL;
     }