store: don't try to commit when there's no transaction

Avoids some error warning.
This commit is contained in:
Dirk-Jan C. Binnema 2021-10-16 11:14:23 +03:00
parent 1a449dd885
commit 672d0c7238
1 changed files with 3 additions and 1 deletions

View File

@ -186,8 +186,10 @@ struct Store::Private {
dirtiness_ = 0;
if (mdata_.in_memory)
return; // not supported in the in-memory backend.
writable_db().commit_transaction();
if (in_transaction_)
writable_db().commit_transaction();
writable_db().begin_transaction();
in_transaction_ = true;
} MU_XAPIAN_CATCH_BLOCK;
void add_synonyms () {