[tracker/tracker-0.12] tracker-store: Print warning if unable to initialize statistics
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.12] tracker-store: Print warning if unable to initialize statistics
- Date: Wed, 15 Feb 2012 15:14:11 +0000 (UTC)
commit 2e825106637eeabb3ad60dd662e077e699b2465e
Author: JÃrg Billeter <j bitron ch>
Date: Thu Jan 26 16:33:44 2012 +0100
tracker-store: Print warning if unable to initialize statistics
src/tracker-store/tracker-statistics.vala | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-store/tracker-statistics.vala b/src/tracker-store/tracker-statistics.vala
index d1a92f1..0e2b45f 100644
--- a/src/tracker-store/tracker-statistics.vala
+++ b/src/tracker-store/tracker-statistics.vala
@@ -39,8 +39,11 @@ public class Tracker.Statistics : Object {
cl.name);
var stat_cursor = stmt.start_cursor ();
- stat_cursor.next ();
- cl.count = (int) stat_cursor.get_integer (0);
+ if (stat_cursor.next ()) {
+ cl.count = (int) stat_cursor.get_integer (0);
+ } else {
+ warning ("Unable to query instance count for class %s", cl.name);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]