sc/source/core/data/documen2.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
New commits: commit 7aae1d338aaf454b99c7354aca78951e26043b2b Author: Eike Rathke <er...@redhat.com> AuthorDate: Sat Feb 26 17:52:29 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Feb 26 20:07:38 2022 +0100 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 <caol...@redhat.com> diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 6cfae1502c17..9a3a2fb1ce0f 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -337,11 +337,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(); }