From 646e4cfa4f8f1858d8ab762594f60a9c91cf19e4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 9 Oct 2024 19:51:42 +0200 Subject: cid#1555929 Data race condition Change-Id: I6748cdb95f4bcca12d6b3201ef2ff077e87081b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174746 Reviewed-by: Noel Grandin Tested-by: Jenkins --- sd/source/console/PresenterTimer.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sd/source') diff --git a/sd/source/console/PresenterTimer.cxx b/sd/source/console/PresenterTimer.cxx index 232c82bafa27..cffb2dc738fc 100644 --- a/sd/source/console/PresenterTimer.cxx +++ b/sd/source/console/PresenterTimer.cxx @@ -96,7 +96,11 @@ public: static void NotifyTermination(); #if !defined NDEBUG - static bool HasInstance() { return mpInstance != nullptr; } + static bool HasInstance() + { + std::scoped_lock aGuard (maInstanceMutex); + return mpInstance != nullptr; + } #endif private: -- cgit