--- a/idlefw/plugins/sapidataplugin/src/sapidata.cpp Tue Jan 26 12:11:15 2010 +0200
+++ b/idlefw/plugins/sapidataplugin/src/sapidata.cpp Tue Feb 02 00:23:10 2010 +0200
@@ -497,8 +497,17 @@
else if( iItemList[pIndex]->iType->Des() == KImage )
{
TInt handle = KErrBadHandle;
+ TUint uintHandle = 0;
+ if ( variant.Get( uintHandle ) )
+ {
+ handle = uintHandle;
+ }
+ else if ( !variant.Get( handle ) )
+ {
+ handle = KErrBadHandle;
+ }
// read as a image handle
- if( ! variant.Get( handle ) )
+ if( handle == KErrBadHandle )
{
// no handle, so read as image path
variant.Get( valPtr );
@@ -507,6 +516,7 @@
else
{
TInt maskHandle = KErrBadHandle;
+ TUint uintmaskHandle = 0;
//Look for image mask
HBufC8* maskKey = HBufC8::NewLC( itemName->Length() + KMask().Length() );
TPtr8 maskKeyPtr = maskKey->Des();
@@ -514,7 +524,14 @@
maskKeyPtr.Append( KMask );
if ( aDataMap->FindL( maskKeyPtr, variant ) )
{
- variant.Get( maskHandle );
+ if ( variant.Get( uintmaskHandle ) )
+ {
+ maskHandle = uintmaskHandle;
+ }
+ else if ( !variant.Get( maskHandle ) )
+ {
+ maskHandle = KErrBadHandle;
+ }
}
CleanupStack::PopAndDestroy( maskKey );
iPlugin->PublishImageL(aObserver, iItemList[pIndex]->iId, handle, maskHandle );