summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-02-26 17:52:29 +0100
committerEike Rathke <erack@redhat.com>2022-02-27 12:19:52 +0100
commit42bb97c06ec326c7e136e01bcd1a88031700b1b1 (patch)
tree974eebfcacb33c86444923c5ce654ba32528b17e /sc
parentfc6c2c752d711dd6113441659ec046032e2c6f80 (diff)
Revert "Related: tdf#147448 Scope owning mutex before it gets destroyed"
This reverts commit dcd042c6f28276d707af409a87a1a4380398e9b0. Reason for revert: Revisiting, it was wrong to put that protector in its own scope because the actual mutex lock is only held in its ctor and it does SetAllowRefresh(true) in dtor, so while it exists it prevents other refresh timers to execute. Change-Id: I058c1359c19971dba59a9273a7a8cddd77ece37f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130556 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 7aae1d338aaf454b99c7354aca78951e26043b2b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130566 Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/documen2.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 82789e814035..da55ebfa85be 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -339,11 +339,7 @@ ScDocument::~ScDocument()
if ( pRefreshTimerControl )
{ // To be sure there isn't anything running do it with a protector,
// this ensures also that nothing needs the control anymore.
- {
- // Use a scope on its own because it is undefined behaviour if a
- // mutex is destroyed while still owned.
- ScRefreshTimerProtector aProt( GetRefreshTimerControlAddress() );
- }
+ ScRefreshTimerProtector aProt( GetRefreshTimerControlAddress() );
pRefreshTimerControl.reset();
}