--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp Wed Sep 01 12:20:56 2010 +0100
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp Tue Sep 14 22:52:29 2010 +0300
@@ -454,21 +454,23 @@
*/
TEntry fileEntry;
TInt err = iFs.Entry(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), fileEntry);
- if (err == KErrNone)
+ CMTPImageDpThumbnailCreator* tnc = iDataProvider.ThumbnailManager();
+ if (err == KErrNone && tnc != NULL)
{
+
if(fileEntry.FileSize() > KFileSizeMax || !alwaysCreate)
{
- iDataProvider.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate);
+ tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate);
}
else
{
- iDataProvider.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags);
+ tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags);
}
/**
* trap the leave to avoid return general error when PC get object property list
*/
- TRAP(err, iDataProvider.ThumbnailManager().GetThumbnailL(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), iThumbnailCache.iThumbnailData, err));
+ TRAP(err, tnc->GetThumbnailL(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), iThumbnailCache.iThumbnailData, err));
if (err == KErrNone)
{
iThumbnailCache.iObjectHandle = iObjectInfo->Uint(CMTPObjectMetaData::EHandle);
@@ -484,6 +486,10 @@
}
}
}
+ else
+ {
+ aValue = KThumbCompressedSize;
+ }
}
break;
@@ -599,22 +605,23 @@
*/
TEntry fileEntry;
TInt err = iFs.Entry(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), fileEntry);
- if (err == KErrNone)
+ CMTPImageDpThumbnailCreator* tnc = iDataProvider.ThumbnailManager();
+ if (err == KErrNone && tnc != NULL)
{
if(fileEntry.FileSize() > KFileSizeMax || !alwaysCreate)
{
- iDataProvider.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate);
+ tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate);
}
else
{
- iDataProvider.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags);
+ tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags);
}
/**
* trap the leave to avoid return general error when PC get object property list
*/
- TRAP(err, iDataProvider.ThumbnailManager().GetThumbnailL(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), iThumbnailCache.iThumbnailData, err));
+ TRAP(err, tnc->GetThumbnailL(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), iThumbnailCache.iThumbnailData, err));
if (err == KErrNone)
{
iThumbnailCache.iObjectHandle = iObjectInfo->Uint(CMTPObjectMetaData::EHandle);