diff --git a/lib/mu-store.cc b/lib/mu-store.cc index 9fd7313d..decdd734 100644 --- a/lib/mu-store.cc +++ b/lib/mu-store.cc @@ -101,8 +101,11 @@ struct Store::Private { contacts_cache_{"", properties_.personal_addresses} { } - ~Private() - try { + ~Private() try { + + if (indexer_) // do this here, since it may call back. + indexer_->stop(); + g_debug("closing store @ %s", properties_.database_path.c_str()); if (!read_only_) { transaction_maybe_commit(true /*force*/);