summaryrefslogtreecommitdiffstats
path: root/g10/tofu.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/tofu.c')
-rw-r--r--g10/tofu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/tofu.c b/g10/tofu.c
index 6a8817237..baa2ac235 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -706,7 +706,8 @@ opendb (char *filename, enum db_type type)
/* If a DB is locked wait up to 5 seconds for the lock to be cleared
before failing. */
- sqlite3_busy_timeout (db, 5 * 1000);
+ if (db)
+ sqlite3_busy_timeout (db, 5 * 1000);
if (filename_free)
xfree (filename);