banshee r5169 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Database



Author: blorentz
Date: Thu Mar 26 20:30:42 2009
New Revision: 5169
URL: http://svn.gnome.org/viewvc/banshee?rev=5169&view=rev

Log:
2009-03-26  Bertrand Lorentz  <bertrand lorentz gmail com>

	* src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs:
	Fix my previous patch to properly handle the case when a table is not
	in sqlite_stat1.



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs	Thu Mar 26 20:30:42 2009
@@ -103,7 +103,7 @@
                     string stat = Query<string> ("SELECT stat FROM sqlite_stat1 WHERE tbl = ? LIMIT 1", table_name);
                     // stat contains space-separated integers,
                     // the first is the number of records in the table
-                    long items_indexed = long.Parse (stat.Split (' ')[0]);
+                    long items_indexed = stat != null ? long.Parse (stat.Split (' ')[0]) : 0;
                     
                     if (Math.Abs (count - items_indexed) > analyze_threshold) {
                         needs_analyze = true;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]