mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbabstractalbum.cpp
branchRCL_3
changeset 26 70a8526f03f2
parent 21 a1247965635c
child 40 cb96c29156b2
--- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbabstractalbum.cpp	Tue Apr 27 16:34:37 2010 +0300
+++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbabstractalbum.cpp	Tue May 11 16:10:56 2010 +0300
@@ -323,13 +323,19 @@
 
     RSqlStatement recordset(GetCategoryRecordL(aId));
     CleanupClosePushL(recordset);
-
-    if (recordset.Next() != KSqlAtRow)
+    HBufC* uri = NULL;
+    if (recordset.Next() == KSqlAtRow)
+        {
+        uri = MPXDbCommonUtil::GetColumnTextL(recordset, EAbstractAlbumUri).AllocL();     
+        }
+    else
         {
-        User::LeaveIfError(KErrNotFound);
+        //entry is deleted due to garbage collection 
+        MPX_DEBUG1("CMPXDbAbstractAlbum::GetUriL, no uri, entry is deleted due to garbage collection"); 
+        TPtrC nullUri(KNullDesC);
+        uri = nullUri.AllocL();
         }
-    HBufC* uri = MPXDbCommonUtil::GetColumnTextL(recordset, EAbstractAlbumUri).AllocL();
-    CleanupStack::PopAndDestroy(&recordset);
+    CleanupStack::PopAndDestroy(&recordset);    
     return uri;
     }