banshee r2996 - in trunk/banshee: . src/Core/Hyena/Hyena.Data.Sqlite
- From: scottp svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r2996 - in trunk/banshee: . src/Core/Hyena/Hyena.Data.Sqlite
- Date: Sat, 19 Jan 2008 20:22:53 +0000 (GMT)
Author: scottp
Date: Sat Jan 19 20:22:52 2008
New Revision: 2996
URL: http://svn.gnome.org/viewvc/banshee?rev=2996&view=rev
Log:
* src/Core/Hyena/Hyena.Data.Sqlite/SqliteModelCache.cs: Now with even
more awesome!
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Hyena/Hyena.Data.Sqlite/SqliteModelCache.cs
Modified: trunk/banshee/src/Core/Hyena/Hyena.Data.Sqlite/SqliteModelCache.cs
==============================================================================
--- trunk/banshee/src/Core/Hyena/Hyena.Data.Sqlite/SqliteModelCache.cs (original)
+++ trunk/banshee/src/Core/Hyena/Hyena.Data.Sqlite/SqliteModelCache.cs Sat Jan 19 20:22:52 2008
@@ -131,11 +131,12 @@
public int IndexOf (int item_id)
{
+ if (rows == 0) {
+ return -1;
+ }
select_single_command.ApplyValues (item_id);
using (IDataReader target_reader = connection.ExecuteReader (select_single_command)) {
- if (!target_reader.Read ()) {
- return -1;
- }
+ target_reader.Read ();
if (first_order_id == -1) {
using (IDataReader reader = connection.ExecuteReader (select_first_command)) {
reader.Read ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]