From 949e16267ba5338f58bae353806c36f6eec55fcc Mon Sep 17 00:00:00 2001 From: Zdibák Zoltán Date: Tue, 30 Oct 2018 18:29:02 +0100 Subject: Reduced scope of the rDefaultElementType variable Change-Id: I6a18502c933937b50a78389b04c5545644d2e3ba Reviewed-on: https://gerrit.libreoffice.org/62638 Tested-by: Jenkins Reviewed-by: Markus Mohrhard --- framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'framework') diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index d6c2201a364f..866679cffc2a 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -1513,10 +1513,12 @@ void SAL_CALL ModuleUIConfigurationManager::reload() try { UIElementType& rUserElementType = m_aUIElements[LAYER_USERDEFINED][i]; - UIElementType& rDefaultElementType = m_aUIElements[LAYER_DEFAULT][i]; if ( rUserElementType.bModified ) + { + UIElementType& rDefaultElementType = m_aUIElements[LAYER_DEFAULT][i]; impl_reloadElementTypeData( rUserElementType, rDefaultElementType, aRemoveNotifyContainer, aReplaceNotifyContainer ); + } } catch ( const Exception& ) { -- cgit