summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/source/sessioninstall/SyncDbusSessionHelper.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx
index d0c1b30a47ed..eca1a4bbb9e5 100644
--- a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx
+++ b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx
@@ -26,7 +26,7 @@ namespace
GError* m_pError;
public:
explicit GErrorWrapper(GError* pError) : m_pError(pError) {}
- ~GErrorWrapper()
+ ~GErrorWrapper() noexcept(false)
{
if(!m_pError)
return;
@@ -39,15 +39,17 @@ namespace
static inline GDBusProxy* lcl_GetPackageKitProxy(const OUString& sInterface)
{
const OString sFullInterface = OUStringToOString("org.freedesktop.PackageKit." + sInterface, RTL_TEXTENCODING_ASCII_US);
- GErrorWrapper error(nullptr);
GDBusProxy* proxy = nullptr;
- proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
+ {
+ GErrorWrapper error(nullptr);
+ proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE, nullptr,
"org.freedesktop.PackageKit",
"/org/freedesktop/PackageKit",
reinterpret_cast<const gchar*>(sFullInterface.getStr()),
nullptr,
&error.getRef());
+ }
if(!proxy)
throw RuntimeException("couldnt get a proxy!");
return proxy;