sw/source/ui/dbui/mmoutputtypepage.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 5b5205f1b1835cff20c091856887273f3a2c1e73 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Apr 1 10:02:05 2022 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Apr 1 11:06:26 2022 +0200 std::mutex->std::recursive_mutex in SwSendMailDialog_Impl ... after commit 2f2616a886cbf7bc06816d6b4a6f6b991f896d51 Author Noel Grandin <noelgran...@gmail.com> Date Wed Aug 04 19:09:28 2021 +0200 osl::Mutex->std::mutex in SwSendMailDialog_Impl The mutex may be locked recursively. Maybe it's possible to restructure locking to avoid that; but I don't feel brave to do that, and think that documenting the current behavior would be useful when such a restructure is performed. Change-Id: I3369445a5e615119db785054afe9aad5a9128b8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132396 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index e8c8e35bc3dc..449f1575e253 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -74,7 +74,10 @@ IMPL_LINK_NOARG(SwMailMergeOutputTypePage, TypeHdl_Impl, weld::Toggleable&, void struct SwSendMailDialog_Impl { friend class SwSendMailDialog; - std::mutex aDescriptorMutex; + // The mutex is locked in SwSendMailDialog_Impl::GetNextDescriptor, which may be called + // both with mutex unlocked (inside SwSendMailDialog::SendMails), and with mutex locked + // (inside SwSendMailDialog::AddDocument). + std::recursive_mutex aDescriptorMutex; std::vector< SwMailDescriptor > aDescriptors; sal_uInt32 nCurrentDescriptor;