From 379d47e261b5950d73171ebf7743190ef35e9855 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Mon, 23 Feb 2026 18:20:23 +0100 Subject: [PATCH] updatecheck: Declare var where it's assigned Change-Id: Iae876b7e931cacd7362f93409faa962960eb75dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200076 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- extensions/source/update/check/updatecheck.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index a43f48c37522..be434c266a84 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -1430,8 +1430,6 @@ UpdateCheck::storeReleaseNote(sal_Int8 nNum, const OUString &rURL) void UpdateCheck::showExtensionDialog() { - uno::Reference< uno::XInterface > xService; - if( ! m_xContext.is() ) throw uno::RuntimeException( u"UpdateCheck::showExtensionDialog(): empty component context"_ustr, uno::Reference< uno::XInterface > () ); @@ -1441,7 +1439,8 @@ void UpdateCheck::showExtensionDialog() throw uno::RuntimeException( u"UpdateCheck::showExtensionDialog(): unable to obtain service manager from component context"_ustr, uno::Reference< uno::XInterface > () ); - xService = xServiceManager->createInstanceWithContext( u"com.sun.star.deployment.ui.PackageManagerDialog"_ustr, m_xContext ); + uno::Reference xService = xServiceManager->createInstanceWithContext( + u"com.sun.star.deployment.ui.PackageManagerDialog"_ustr, m_xContext); uno::Reference< task::XJobExecutor > xExecutable( xService, uno::UNO_QUERY ); if ( xExecutable.is() ) xExecutable->trigger( u"SHOW_UPDATE_DIALOG"_ustr );