From 0be54119d812ed883e3c1235ef1f22fb85531a2e Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 18 May 2022 18:07:19 +0300 Subject: [PATCH] store: stop indexer in dtor --- lib/mu-store.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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*/);