emailuis/emailui/src/ncssubjectfield.cpp
changeset 1 12c456ceeff2
parent 0 8466d47a6819
child 8 e1b6206813b4
--- a/emailuis/emailui/src/ncssubjectfield.cpp	Thu Dec 17 08:39:21 2009 +0200
+++ b/emailuis/emailui/src/ncssubjectfield.cpp	Thu Jan 07 12:38:38 2010 +0200
@@ -80,13 +80,16 @@
     FUNC_LOG;
     // Create label
 	HBufC* aTextBuf = StringLoader::LoadLC( aLabelTextId );
+    TPtrC captionText = aTextBuf ? aTextBuf->Des() : TPtrC();
     iLabel = new ( ELeave ) CNcsLabel( *this, NULL );
-    iLabel->SetTextL( aTextBuf->Des() );
-	CleanupStack::PopAndDestroy( aTextBuf );
-	// S60 Skin support
+    iLabel->SetTextL( captionText );
+
+    // S60 Skin support
 	iLabel->SetBrushStyle(CWindowGc::ENullBrush);
 
-    iTextEditor = new ( ELeave ) CNcsEditor( iSizeObserver, ETrue, ENcsEditorSubject );
+    iTextEditor = new ( ELeave ) CNcsEditor( iSizeObserver, ETrue, ENcsEditorSubject, captionText );
+    CleanupStack::PopAndDestroy( aTextBuf );
+
     // iTextEditor is not completely constructed until in SetContainerWindowL()
     iFocusChangeHandler = new (ELeave) CAsyncCallBack( CActive::EPriorityStandard );
     }