From 12c00caa3d017116ba29801578f1bd42b111824a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 23 Feb 2023 09:39:35 +0200 Subject: unlock during dispose in configmgr::configuration_provider::Service Since the code that can run during flushModifications might manage to call back into Service.. regression from commit a61951a3a21c6457334f78f657806c1167dbf339 Author: Noel Grandin Date: Mon Feb 20 20:08:30 2023 +0200 BaseMutex->std::mutex in configmgr::configuration_provider::Service Change-Id: I0070e7589cdea38905de6c68adefd8081b122152 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147500 Tested-by: Jenkins Reviewed-by: Noel Grandin --- configmgr/source/configurationprovider.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'configmgr') diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx index 215cad7f6f14..a99309397e37 100644 --- a/configmgr/source/configurationprovider.cxx +++ b/configmgr/source/configurationprovider.cxx @@ -106,7 +106,7 @@ private: virtual ~Service() override {} - virtual void disposing(std::unique_lock& /*rGuard*/) override { flushModifications(); } + virtual void disposing(std::unique_lock& rGuard) override; virtual OUString SAL_CALL getImplementationName() override { @@ -330,6 +330,12 @@ css::lang::Locale Service::getLocale() { return loc; } +void Service::disposing(std::unique_lock& rGuard) { + rGuard.unlock(); // just in case we call back into Service during dispose() + flushModifications(); + rGuard.lock(); +} + void Service::flushModifications() const { Components * components; { -- cgit