diff -r 5b238bc8ffb6 -r 01504893d9cb photosgallery/viewframework/medialists/src/glxattributecontext.cpp --- a/photosgallery/viewframework/medialists/src/glxattributecontext.cpp Wed Sep 15 12:13:06 2010 +0300 +++ b/photosgallery/viewframework/medialists/src/glxattributecontext.cpp Wed Oct 13 14:32:09 2010 +0300 @@ -172,19 +172,20 @@ } } + // If the attribute request is for Thumbnail, Check if there is a match found. // And set the size and thumbnail quality TIdentityRelation matchContent(&TMPXAttribute::MatchContentId); TMPXAttribute tnAttr(KGlxMediaIdThumbnail, 0); - if (aAttributes.Find(tnAttr, matchContent) != KErrNotFound) + if (iAttributes.Find(tnAttr, matchContent) != KErrNotFound) { // Allocate CMPXAttributeSpecs CMPXAttributeSpecs* attributeSpecs = CMPXAttributeSpecs::NewL(); CleanupStack::PushL(attributeSpecs); - attributeSpecs->SetTObjectValueL( - TMPXAttribute( KGlxMediaIdThumbnail, + attributeSpecs->SetTObjectValueL( + TMPXAttribute( KGlxMediaIdThumbnail, KGlxAttribSpecThumbnailSize ), TSize(iDefaultSpecSize.iWidth,iDefaultSpecSize.iHeight) ); @@ -192,16 +193,11 @@ TMPXAttribute( KGlxMediaIdThumbnail, KGlxAttribSpecThumbnailQualityOverSpeed ), ETrue ); - // Memory leak guard check - if (aDetailedSpecs) - { - delete aDetailedSpecs; - aDetailedSpecs = NULL; - } aDetailedSpecs = attributeSpecs; // Pop from stack CleanupStack::Pop(attributeSpecs); + } // If an error was found, return KErrGeneral