summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2024-10-09 19:51:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-10-10 10:52:59 +0200
commit646e4cfa4f8f1858d8ab762594f60a9c91cf19e4 (patch)
treedda8f2c902ef993b9bc9f5ed5a8cd77e9089077c /sd/source
parent0216369a736a83bc9440c24220c803127e671c5c (diff)
cid#1555929 Data race condition
Change-Id: I6748cdb95f4bcca12d6b3201ef2ff077e87081b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174746 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/console/PresenterTimer.cxx6
1 files changed, 5 insertions, 1 deletions
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: