mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbabstractalbum.cpp
equal
deleted
inserted
replaced
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 // ---------------------------------------------------------------------------- |