aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/plugin_datastore_sqlite.c
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2010-04-04 22:27:57 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2010-04-04 22:27:57 +0000
commitc3996290b018bd9003fe8304704ab4ca5c65facf (patch)
treef7a1f9813fc4d407e97368a21e21dafdd21d18ca /src/datastore/plugin_datastore_sqlite.c
parent9cbc289321dac2e4821e84decd7bf33877f55d05 (diff)
fix
git-svn-id: https://gnunet.org/svn/gnunet@10783 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/datastore/plugin_datastore_sqlite.c')
-rw-r--r--src/datastore/plugin_datastore_sqlite.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index cecdf094f6..0b575c981c 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -1609,9 +1609,11 @@ process_stat_done (void *cls,
sq_prepare (plugin->dbh,
"PRAGMA page_count",
&stmt));
- CHECK (SQLITE_ROW ==
- sqlite3_step (stmt));
- pages = sqlite3_column_int64 (stmt, 0);
+ if (SQLITE_ROW ==
+ sqlite3_step (stmt))
+ pages = sqlite3_column_int64 (stmt, 0);
+ else
+ pages = 0;
sqlite3_finalize (stmt);
CHECK (SQLITE_OK ==
sq_prepare (plugin->dbh,