diff -r a32b19fb291e -r 5b14749788d7 messagingapp/msgappfw/utils/src/ccsconversationentry.cpp --- a/messagingapp/msgappfw/utils/src/ccsconversationentry.cpp Thu Jun 17 09:57:06 2010 +0100 +++ b/messagingapp/msgappfw/utils/src/ccsconversationentry.cpp Thu Jul 22 16:32:06 2010 +0100 @@ -135,12 +135,9 @@ // Sets the Conversation contact of this object // ---------------------------------------------------------------------------- EXPORT_C void CCsConversationEntry::SetContactL(const TDesC& aContact) - { - if((&aContact)) - { - iContact = aContact.AllocL(); - } - } +{ + iContact = aContact.AllocL(); +} // ---------------------------------------------------------------------------- // CCsConversationEntry::ConversationDir @@ -211,17 +208,15 @@ // Sets the Conversation description of this object // ---------------------------------------------------------------------------- EXPORT_C void CCsConversationEntry::SetDescriptionL(const TDesC& aDescription) - { - if((&aDescription)) - { - TInt descrLength = aDescription.Length(); - if ( descrLength > KMaxDescrSize ) - descrLength = KMaxDescrSize; - - iDescription = HBufC::NewL(descrLength); - iDescription->Des().Copy(aDescription.Left(descrLength)); - } - } +{ + + TInt descrLength = aDescription.Length(); + if (descrLength > KMaxDescrSize) + descrLength = KMaxDescrSize; + iDescription = HBufC::NewL(descrLength); + iDescription->Des().Copy(aDescription.Left(descrLength)); + +} // ---------------------------------------------------------------------------- // CCsConversationEntry::ChangeAttributes @@ -255,13 +250,16 @@ CCsConversationEntry* cloneObject = CCsConversationEntry::NewL(); CleanupStack::PushL(cloneObject); - cloneObject->SetContactL(*iContact); + if (iContact) + cloneObject->SetContactL(*iContact); + cloneObject->SetConversationDir(iConversationDir); cloneObject->SetType(iConversationType); cloneObject->SetEntryId(iEntryID); cloneObject->SetSendState(iConversationStatus); cloneObject->ChangeAttributes(iConversationAttrib, ECsAttributeNone); - cloneObject->SetDescriptionL(*iDescription); + if(iDescription) + cloneObject->SetDescriptionL(*iDescription); cloneObject->SetTimeStampL(iTimeStamp); CleanupStack::Pop(cloneObject);