diff -r bcb43dc84c44 -r 2dac0fdba72b photosgallery/viewframework/medialists/src/glxcachemanager.cpp --- a/photosgallery/viewframework/medialists/src/glxcachemanager.cpp Wed Mar 31 21:31:03 2010 +0300 +++ b/photosgallery/viewframework/medialists/src/glxcachemanager.cpp Wed Apr 14 15:57:24 2010 +0300 @@ -330,22 +330,19 @@ RPointerArray< MGlxMediaUser > users; CleanupClosePushL( users ); - // Record the error on all requested attributes TInt idCount = iRequestedItemIds.Count(); - - for( TInt idIndex = 0; idIndex < idCount; idIndex++ ) - { - CGlxMedia* item = MediaForceCreateL(aIdSpaceId, iRequestedItemIds[idIndex]); - GlxErrorManager::SetAttributeErrorL(item, iRequestedAttrs, aError); - - // Keep track of media lists to notify later - TInt userCount = item->UserCount(); - for ( TInt userIndex = 0; userIndex < userCount; userIndex++ ) - { - users.InsertInAddressOrder( &item->User( userIndex ) ); - } - } - + if(idCount) + { + CGlxMedia* item = MediaForceCreateL(aIdSpaceId, iRequestedItemIds[0]); + GlxErrorManager::SetAttributeErrorL(item, iRequestedAttrs, aError); + + // Keep track of media lists to notify later + TInt userCount = item->UserCount(); + for ( TInt userIndex = 0; userIndex < userCount; userIndex++ ) + { + users.InsertInAddressOrder( &item->User( userIndex ) ); + } + } // Notify all affected users of error TInt userCount = users.Count(); for ( TInt i = 0; i < userCount; i++ )