From 24a57e2b854a1b8b3b8533ac72a6614ee29e374a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 12 Apr 2018 09:11:03 +0200 Subject: Keep strings alive again as necessary regression from commit 49eb02f07a5af44da59008a238e828b4a9532bef new loplugin:unusedvariablemore Change-Id: If92be219368a0dc33f40cd425efc6028c28c5e53 --- shell/source/sessioninstall/SyncDbusSessionHelper.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'shell') diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx index cf95c1c568f9..09673698de9e 100644 --- a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx +++ b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx @@ -67,10 +67,13 @@ void request( css::uno::Sequence const & resources, OUString const & interaction) { + // Keep strings alive until after call to g_dbus_proxy_call_sync + std::vector resUtf8; std::shared_ptr builder( g_variant_builder_new(G_VARIANT_TYPE ("as")), GVariantBuilderDeleter()); for (auto & i: resources) { auto s(OUStringToOString(i, RTL_TEXTENCODING_UTF8)); + resUtf8.push_back(s); g_variant_builder_add(builder.get(), "s", s.getStr()); } auto iactUtf8(OUStringToOString(interaction, RTL_TEXTENCODING_UTF8)); -- cgit v1.2.3