logsui/AppSrc/CLogsBaseView.cpp
branchRCL_3
changeset 12 4ae315f230bc
parent 11 2828b4d142c0
child 15 34879f5cfc63
--- a/logsui/AppSrc/CLogsBaseView.cpp	Tue May 11 16:00:21 2010 +0300
+++ b/logsui/AppSrc/CLogsBaseView.cpp	Tue May 25 12:26:45 2010 +0300
@@ -2015,9 +2015,7 @@
 void CLogsBaseView::SendMessageCmdHandlerL( 
     TInt  aCommandId ,
     const MLogsEventGetter* aEvent )
-    {
-    CMessageData* messageData = CMessageData::NewL();
-    CleanupStack::PushL( messageData );
+    {   
     
     TBool isRead = aEvent->Event()->IsRead();
     TLogId logid = aEvent->LogId();
@@ -2032,8 +2030,11 @@
     else
         {
         return;    
-        }        
-
+        } 
+    
+    CMessageData* messageData = CMessageData::NewL();
+    CleanupStack::PushL( messageData );
+    
     TBuf<KLogsPhoneNumberMaxLen> nbrBuff;        
     CPhoneNumberFormat::DTMFStrip( number, nbrBuff );
     
@@ -2877,10 +2878,12 @@
 
     HBufC* textBuf = NULL;
     textBuf = StringLoader::LoadLC( R_STM_MY_ADDRESS, buf );    
-	CAknNoteDialog* noteDlg = new ( ELeave ) CAknNoteDialog( );
+    CAknNoteDialog* noteDlg = new ( ELeave ) CAknNoteDialog( );
+    CleanupStack::PushL( noteDlg );
     noteDlg->SetTextL( *textBuf );
-	noteDlg->ExecuteLD( R_MY_ADDRESS_QUERY );	
-    CleanupStack::PopAndDestroy( textBuf );  
+    noteDlg->ExecuteLD( R_MY_ADDRESS_QUERY );	
+    CleanupStack::Pop( noteDlg ); 
+    CleanupStack::PopAndDestroy( textBuf );
     }
 
 // ----------------------------------------------------------------------------