mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbabstractalbum.cpp
branchRCL_3
changeset 17 70a8526f03f2
parent 15 a1247965635c
child 21 cb96c29156b2
equal deleted inserted replaced
15:a1247965635c 17:70a8526f03f2
   321     {
   321     {
   322     MPX_FUNC("CMPXDbAbstractAlbum::GetUriL");
   322     MPX_FUNC("CMPXDbAbstractAlbum::GetUriL");
   323 
   323 
   324     RSqlStatement recordset(GetCategoryRecordL(aId));
   324     RSqlStatement recordset(GetCategoryRecordL(aId));
   325     CleanupClosePushL(recordset);
   325     CleanupClosePushL(recordset);
   326 
   326     HBufC* uri = NULL;
   327     if (recordset.Next() != KSqlAtRow)
   327     if (recordset.Next() == KSqlAtRow)
   328         {
   328         {
   329         User::LeaveIfError(KErrNotFound);
   329         uri = MPXDbCommonUtil::GetColumnTextL(recordset, EAbstractAlbumUri).AllocL();     
   330         }
   330         }
   331     HBufC* uri = MPXDbCommonUtil::GetColumnTextL(recordset, EAbstractAlbumUri).AllocL();
   331     else
   332     CleanupStack::PopAndDestroy(&recordset);
   332         {
       
   333         //entry is deleted due to garbage collection 
       
   334         MPX_DEBUG1("CMPXDbAbstractAlbum::GetUriL, no uri, entry is deleted due to garbage collection"); 
       
   335         TPtrC nullUri(KNullDesC);
       
   336         uri = nullUri.AllocL();
       
   337         }
       
   338     CleanupStack::PopAndDestroy(&recordset);    
   333     return uri;
   339     return uri;
   334     }
   340     }
   335 
   341 
   336 
   342 
   337 // ----------------------------------------------------------------------------
   343 // ----------------------------------------------------------------------------