[Libreoffice-commits] core.git: vcl/source

Luboš Luňák l.lunak at collabora.com
Sun Jun 3 06:53:01 UTC 2018


 vcl/source/app/svmain.cxx |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

New commits:
commit 10da3d817afd3f5d5c4f84cb814d56efc0678d43
Author: Luboš Luňák <l.lunak at collabora.com>
Date:   Wed May 30 18:03:31 2018 +0200

    avoid a deadlock when the crash handler can't acquire SolarMutex
    
    Change-Id: Iea2d9b993dcf08fe022f97a2ac8e15fba9a8568c
    Reviewed-on: https://gerrit.libreoffice.org/55090
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index f337bc9657ce..bd7a4d6890ea 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -158,16 +158,18 @@ oslSignalAction VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo* pInfo)
     {
         bIn = true;
 
-        SolarMutexGuard aLock;
-
-        // do not stop timer because otherwise the UAE-Box will not be painted as well
-        ImplSVData* pSVData = ImplGetSVData();
-        if ( pSVData->mpApp )
+        vcl::SolarMutexTryAndBuyGuard aLock;
+        if( aLock.isAcquired())
         {
-            SystemWindowFlags nOldMode = Application::GetSystemWindowMode();
-            Application::SetSystemWindowMode( nOldMode & ~SystemWindowFlags::NOAUTOMODE );
-            pSVData->mpApp->Exception( nVCLException );
-            Application::SetSystemWindowMode( nOldMode );
+            // do not stop timer because otherwise the UAE-Box will not be painted as well
+            ImplSVData* pSVData = ImplGetSVData();
+            if ( pSVData->mpApp )
+            {
+                SystemWindowFlags nOldMode = Application::GetSystemWindowMode();
+                Application::SetSystemWindowMode( nOldMode & ~SystemWindowFlags::NOAUTOMODE );
+                pSVData->mpApp->Exception( nVCLException );
+                Application::SetSystemWindowMode( nOldMode );
+            }
         }
         bIn = false;
     }


More information about the Libreoffice-commits mailing list