Kaydet (Commit) f4c73f90 authored tarafından Miklos Vajna's avatar Miklos Vajna

tdf#117866 cui personalization: fix a possible race

The case when the thread is re-scheduled exactly after checking for
m_bExecute but before taking the solar mutex.

Change-Id: I494c123a6225da60407391771622208c055ae49b
Reviewed-on: https://gerrit.libreoffice.org/56585Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
üst 0e0ceebc
......@@ -99,7 +99,13 @@ SelectPersonaDialog::~SelectPersonaDialog()
void SelectPersonaDialog::dispose()
{
if (m_pSearchThread.is())
{
// Release the solar mutex, so the thread is not affected by the race
// when it's after the m_bExecute check but before taking the solar
// mutex.
SolarMutexReleaser aReleaser;
m_pSearchThread->join();
}
m_pEdit.clear();
m_pSearchButton.clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment