summaryrefslogtreecommitdiff
path: root/vcl/source/app/svmain.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2018-05-30 18:03:31 +0200
committerLuboš Luňák <l.lunak@collabora.com>2018-06-03 08:52:40 +0200
commit10da3d817afd3f5d5c4f84cb814d56efc0678d43 (patch)
tree756a67d51f0591951ad4204edcaa2c52e997cbb4 /vcl/source/app/svmain.cxx
parent5cbf6e936dfa402bc3b9c6cd2745f64fc71e0cc0 (diff)
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@libreoffice.org> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/source/app/svmain.cxx')
-rw-r--r--vcl/source/app/svmain.cxx20
1 files changed, 11 insertions, 9 deletions
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;
}