diff -r 5456b4e8b3a8 -r 3321d3e205b6 idlehomescreen/widgetmanager/src/wmwidgetdata.cpp --- a/idlehomescreen/widgetmanager/src/wmwidgetdata.cpp Wed Sep 01 12:32:46 2010 +0100 +++ b/idlehomescreen/widgetmanager/src/wmwidgetdata.cpp Tue Sep 14 20:58:58 2010 +0300 @@ -132,13 +132,21 @@ // get publisher uid from widget registry FetchPublisherUidL( aHsContentInfo->PublisherId(), aRegistryClientSession ); - + + // delete the old list box item + delete iMdcaPoint; + iMdcaPoint = NULL; + // create iMdcaPoint for listbox _LIT( KFormatStr, "0\t%S"); iMdcaPoint = HBufC::NewL( aHsContentInfo->Name().Length() + KFormatStr().Length() ); iMdcaPoint->Des().Format( KFormatStr(), &aHsContentInfo->Name() ); + // delete the old content info + delete iHsContentInfo; + iHsContentInfo = NULL; + // take ownership of the content info iHsContentInfo = aHsContentInfo; } @@ -423,10 +431,6 @@ TBool sameLogo = ( iHsContentInfo->IconPath() == aHsContentInfo->IconPath() ); - // delete the old content info - delete iHsContentInfo; - iHsContentInfo = NULL; - // re-init the object, take care about leave. TRAPD( err, InitL( aHsContentInfo, NULL ); ); if ( KErrNone != err )