diff -r 238255e8b033 -r 84d9eb65b26f messagingapp/msgappfw/server/src/ccsconversationmarkreadhandler.cpp --- a/messagingapp/msgappfw/server/src/ccsconversationmarkreadhandler.cpp Fri Apr 16 14:56:15 2010 +0300 +++ b/messagingapp/msgappfw/server/src/ccsconversationmarkreadhandler.cpp Mon May 03 12:29:07 2010 +0300 @@ -114,7 +114,8 @@ TRAPD(err, cEntry = iSession->GetEntryL(id)); if ( err == KErrNotFound ) return; - + CleanupStack::PushL(cEntry); + TMsvEntry entry = cEntry->Entry(); if ( entry.Unread() ) { @@ -125,7 +126,7 @@ } cEntry->ChangeL( entry ); } - delete cEntry; + CleanupStack::PopAndDestroy(cEntry); } } @@ -176,8 +177,21 @@ // Notify observers iObserver->MarkReadComplete(this); break; - } } +} + +TInt CCsConversationMarkReadHandler::RunError(TInt aError) +{ + iMarkReadCount = 0; + iConversationEntryList->ResetAndDestroy(); + iConversationEntryList->Close(); + delete iConversationEntryList; + iConversationEntryList = NULL; + + // Notify observer + iObserver->MarkReadComplete(this); + return KErrNone; +} // ---------------------------------------------------------------------------- // DoCancel