svx/source/unodraw/unoshcol.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
New commits: commit 05b9dd6ec67c91a03cd7339b6c10e0e06a96f08e Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Nov 8 10:47:59 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri Nov 8 14:01:32 2024 +0100 cid#1620539 Check of thread-shared field evades lock acquisition Change-Id: Ifd0008d8258b7fe9e72d40ae0384ff9f5e538190 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176268 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx index 280dd23f98cf..b99f6674a371 100644 --- a/svx/source/unodraw/unoshcol.cxx +++ b/svx/source/unodraw/unoshcol.cxx @@ -95,6 +95,10 @@ void SvxShapeCollection::dispose() std::unique_lock g(m_aMutex); maEventListeners.disposeAndClear( g, aEvt ); maShapeContainer.clear(); + + // bDisposed and bInDispose must be set in this order. + bDisposed = true; + bInDispose = false; } catch(const css::uno::Exception&) { @@ -105,11 +109,6 @@ void SvxShapeCollection::dispose() bInDispose = false; throw; } - - // the values bDispose and bInDisposing must set in this order. - // No multithread call overcome the "!rBHelper.bDisposed && !rBHelper.bInDispose" guard. - bDisposed = true; - bInDispose = false; } // XComponent