diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-01-29 11:07:45 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-01-29 15:21:00 +0100 |
commit | 0f8be9de7eed7cf26a740ddd89d2071003a1af86 (patch) | |
tree | f17357307062d150074e06cbed6b1110177036c4 /svtools | |
parent | 3b57cb72ec8b47f033be5a516617ed8c752517b0 (diff) |
Guard read access of static data
Change-Id: I257bf0a1efb36b5d2c4cd7d932cc400dfafa0846
Reviewed-on: https://gerrit.libreoffice.org/48821
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/java/javainteractionhandler.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx index 311bbcb23d24..94f0491fd676 100644 --- a/svtools/source/java/javainteractionhandler.cxx +++ b/svtools/source/java/javainteractionhandler.cxx @@ -125,10 +125,10 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque if ( anyExc >>= e1 ) { + SolarMutexGuard aSolarGuard; if( !g_JavaEvents.bNotFoundHandled ) { // No suitable JRE found - SolarMutexGuard aSolarGuard; g_JavaEvents.bNotFoundHandled = true; #if defined( MACOSX ) ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, SvtResId(STR_WARNING_JAVANOTFOUND_MAC), VclMessageType::Warning); @@ -153,10 +153,10 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque } else if ( anyExc >>= e2 ) { + SolarMutexGuard aSolarGuard; if( !g_JavaEvents.bInvalidSettingsHandled ) { // javavendors.xml was updated and Java has not been configured yet - SolarMutexGuard aSolarGuard; g_JavaEvents.bInvalidSettingsHandled = true; #ifdef MACOSX ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, SvtResId(STR_WARNING_INVALIDJAVASETTINGS_MAC), VclMessageType::Warning); @@ -173,9 +173,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque } else if ( anyExc >>= e3 ) { + SolarMutexGuard aSolarGuard; if( !g_JavaEvents.bDisabledHandled ) { - SolarMutexGuard aSolarGuard; g_JavaEvents.bDisabledHandled = true; // Java disabled. Give user a chance to enable Java inside Office. ScopedVclPtrInstance<MessageDialog> aQueryBox(nullptr , "JavaDisabledDialog", @@ -196,10 +196,10 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque } else if ( anyExc >>= e4 ) { + SolarMutexGuard aSolarGuard; if( !g_JavaEvents.bVMCreationFailureHandled ) { // Java not correctly installed, or damaged - SolarMutexGuard aSolarGuard; g_JavaEvents.bVMCreationFailureHandled = true; #ifdef MACOSX ScopedVclPtrInstance< MessageDialog > aErrorBox(nullptr, SvtResId(STR_ERROR_JVMCREATIONFAILED_MAC)); @@ -216,11 +216,11 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque } else if ( anyExc >>= e5 ) { + SolarMutexGuard aSolarGuard; if( !g_JavaEvents.bRestartRequiredHandled ) { // a new JRE was selected, but office needs to be restarted //before it can be used. - SolarMutexGuard aSolarGuard; g_JavaEvents.bRestartRequiredHandled = true; svtools::executeRestartDialog( comphelper::getProcessComponentContext(), nullptr, |