cui/source/options/personalization.cxx |    4 ++++
 vcl/source/window/msgbox.cxx           |    2 ++
 2 files changed, 6 insertions(+)

New commits:
commit 8fb6d980868bc08b1eef4c95bd820131c2b03640
Author: Xisco Fauli <aniste...@gmail.com>
Date:   Thu Jan 4 12:41:07 2018 +0100

    tdf#114818 hold the mutex before executing the error dialog
    
    Also add an assert to ErrorBox to ensure the mutex is acquired
    
    Change-Id: I3e426024dad6ddfc5cffc7861b0cba9e8989c018
    Reviewed-on: https://gerrit.libreoffice.org/47388
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    (cherry picked from commit 0ddd15c1134dde249552ebe763c1cd005e8b4591)
    Reviewed-on: https://gerrit.libreoffice.org/47570
    Reviewed-by: Michael Stahl <mst...@redhat.com>

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index d18d56b06fb6..c75a78c8ef2e 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -702,6 +702,7 @@ void SearchAndParseThread::execute()
                 {
                     // in case of a returned CommandFailedException
                     // SimpleFileAccess serves it, returning an empty stream
+                    SolarMutexGuard aGuard;
                     sError = CuiResId(RID_SVXSTR_SEARCHERROR);
                     sError = sError.replaceAll("%1", m_aURL);
                     m_pPersonaDialog->SetProgress( OUString() );
@@ -714,6 +715,7 @@ void SearchAndParseThread::execute()
             {
                 // a catch all clause, in case the exception is not
                 // served elsewhere
+                SolarMutexGuard aGuard;
                 sError = CuiResId(RID_SVXSTR_SEARCHERROR);
                 sError = sError.replaceAll("%1", m_aURL);
                 m_pPersonaDialog->SetProgress( OUString() );
@@ -754,6 +756,7 @@ void SearchAndParseThread::execute()
             {
                 if( m_bDirectURL )
                 {
+                    SolarMutexGuard aGuard;
                     sError = CuiResId(RID_SVXSTR_SEARCHERROR);
                     sError = sError.replaceAll("%1", m_aURL);
                     m_pPersonaDialog->SetProgress( OUString() );
@@ -837,6 +840,7 @@ void SearchAndParseThread::execute()
         }
         catch ( const uno::Exception & )
         {
+            SolarMutexGuard aGuard;
             sError = CuiResId( RID_SVXSTR_SEARCHERROR );
             sError = sError.replaceAll("%1", m_aURL);
             m_pPersonaDialog->SetProgress( OUString() );
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 67b3edf1df37..e45dfd0dee4f 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -433,6 +433,7 @@ OUString WarningBox::GetStandardText()
 ErrorBox::ErrorBox( vcl::Window* pParent, const OUString& rMessage ) :
     MessBox( pParent, MessBoxStyle::Ok | MessBoxStyle::DefaultOk, 0, 
OUString(), rMessage )
 {
+    DBG_TESTSOLARMUTEX();
     // Default Text is the display title from the application
     if ( GetText().isEmpty() )
         SetText( GetStandardText() );
@@ -450,6 +451,7 @@ ErrorBox::ErrorBox( vcl::Window* pParent, MessBoxStyle 
nStyle, WinBits nWinBits,
                     const OUString& rMessage ) :
     MessBox( pParent, nStyle, nWinBits, OUString(), rMessage )
 {
+    DBG_TESTSOLARMUTEX();
     // Default Text is the display title from the application
     if ( GetText().isEmpty() )
         SetText( GetStandardText() );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to