diff options
Diffstat (limited to 'addressbook/backend')
-rw-r--r-- | addressbook/backend/pas/pas-backend-file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c index 4f0b54dc61..56ce7dcd3d 100644 --- a/addressbook/backend/pas/pas-backend-file.c +++ b/addressbook/backend/pas/pas-backend-file.c @@ -1476,6 +1476,8 @@ pas_backend_file_load_uri (PASBackend *backend, db_error = db->open (db, filename, NULL, DB_HASH, 0, 0666); } + bf->priv->file_db = db; + if (db_error == 0) { writable = TRUE; } else { @@ -1507,12 +1509,13 @@ pas_backend_file_load_uri (PASBackend *backend, g_free (filename); + if (db_error != 0) { + bf->priv->file_db = NULL; return FALSE; } bf->priv->writable = writable; - bf->priv->file_db = db; if (pas_backend_file_maybe_upgrade_db (bf)) bf->priv->loaded = TRUE; |