--- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatampxaccess.cpp Wed Sep 15 12:45:22 2010 +0300
+++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatampxaccess.cpp Wed Oct 13 15:06:09 2010 +0300
@@ -902,7 +902,7 @@
delete iSampleData;
iSampleData = NULL;
- iSampleData = HBufC8::NewL( numElements );
+ iSampleData = HBufC8::NewL( numElements * sizeof( TUint8 ) );
TPtr8 samplePtr = iSampleData->Des();
mtpTypeArray.ToDes( samplePtr );
RFile sampleFile;
@@ -1522,6 +1522,12 @@
PRINT( _L( "MM MTP <> Modified contents are:" ) );
foundMedia = FindWMPMediaLC( KMPXMediaGeneralModified, ETrue ); // + foundMedia
+
+ if ( !foundMedia->IsSupported( KMPXMediaArrayCount ) )
+ {
+ User::Leave( KErrNotSupported );
+ }
+
foundItemCount = *foundMedia->Value<TInt>( KMPXMediaArrayCount );
PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::GetModifiedContentL() found %d Media Objects" ), foundItemCount );
@@ -1594,14 +1600,14 @@
CleanupStack::PopAndDestroy( &playlistAttributes ); // - playlistAttributes
CleanupStack::PopAndDestroy( searchMedia ); // - searchMedia
- CleanupStack::PushL( foundMedia ); // + foundMedia
if ( !foundMedia->IsSupported( KMPXMediaArrayCount ) )
User::Leave( KErrNotSupported );
TInt foundItemCount = *foundMedia->Value<TInt>( KMPXMediaArrayCount );
- CleanupStack::PopAndDestroy( foundMedia ); // - foundMedia
+ delete foundMedia;
+ foundMedia = NULL;
PRINT1( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::IsExist foundItemCount(%d)" ), foundItemCount );
return ( foundItemCount > 0 ? ETrue : EFalse );