From ed8514af4930fdf67f0f213f62551dbbec45af83 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 11 Nov 2024 10:49:14 +0000 Subject: cid#1607905 Data race condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idb525a4e19cfbe0c4a493f511be7dadafac0cff5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176465 Reviewed-by: Caolán McNamara Tested-by: Jenkins --- desktop/source/offacc/acceptor.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'desktop/source') diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx index 5dbecd0f1254..2c51a73c1199 100644 --- a/desktop/source/offacc/acceptor.cxx +++ b/desktop/source/offacc/acceptor.cxx @@ -117,10 +117,9 @@ void Acceptor::run() // create the bridge. The remote end will have a reference to this bridge // thus preventing the bridge from being disposed. When the remote end releases // the bridge, it will be destructed. - Reference< XBridge > rBridge = m_rBridgeFactory->createBridge( - u""_ustr, m_aProtocol, rConnection, rInstanceProvider); std::unique_lock g(m_aMutex); - m_bridges.add(rBridge); + m_bridges.add(m_rBridgeFactory->createBridge( + u""_ustr, m_aProtocol, rConnection, rInstanceProvider)); } catch (const Exception&) { TOOLS_WARN_EXCEPTION("desktop.offacc", ""); // connection failed... -- cgit