diff options
authorMiklos Vajna <>2018-04-24 17:44:54 +0200
committerCaolán McNamara <>2018-04-26 21:52:59 +0200
commit0d90c992f54845b2403e7f564fec00ce876736ad (patch)
parent4b80ac6c578bf94b88bfa0f2fec8c638f3531e14 (diff)
tdf#113377 cui personalization: fix calling into VCL without necessary locking
We assume the SolarMutex is always taken when doing GL calls, but putting DBG_TESTSOLARMUTEX() into WinOpenGLContext::makeCurrent() pointed out two places in the persona code where this invariant wasn't hold, fix those. Opening the dialog and downloading previews of one category, then clicking on an other button to download previews of an other category no longer results in a crash while calling glBindFramebuffer() with this. (cherry picked from commit 336d91a6f2bc12ff0342f984cdbb2cf64abd0b56) Change-Id: Ib8148a709f89c2dc44da102e2023cc61ba890744 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <> (cherry picked from commit 980e19ddddaf46dae68c800d55582e8f6b2c7fdd) Reviewed-on: Reviewed-by: Michael Meeks <>
1 files changed, 4 insertions, 2 deletions
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 9b3e482b55d2..a9ff29edf078 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -252,6 +252,8 @@ void SelectPersonaDialog::AddPersonaSetting( OUString const & rPersonaSetting )
void SelectPersonaDialog::ClearSearchResults()
+ // for VCL to be able to destroy bitmaps
+ SolarMutexGuard aGuard;
for(VclPtr<PushButton> & nIndex : m_vResultList)
@@ -770,14 +772,14 @@ void SearchAndParseThread::execute()
INetURLObject aURLObj( sPreviewFile );
+ // for VCL to be able to create bitmaps / do visual changes in the thread
+ SolarMutexGuard aGuard;
aFilter.ImportGraphic( aGraphic, aURLObj );
Bitmap aBmp = aGraphic.GetBitmap();
if( !m_bExecute )
- // for VCL to be able to do visual changes in the thread
- SolarMutexGuard aGuard;
m_pPersonaDialog->SetImages( Image( aBmp ), nIndex++ );
m_pPersonaDialog->AddPersonaSetting( aPersonaSetting );