jvmfwk/source/framework.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 6ec4109f73740de067b713cd46dae043f1b05dc5
Author: Stephan Bergmann <[email protected]>
Date: Thu Apr 12 08:26:34 2018 +0200
Keep strings alive again as necessary
...fixing regression introduced with
49eb02f07a5af44da59008a238e828b4a9532bef
"new loplugin:unusedvariablemore"
Change-Id: Ib598d67add50031937c9c9f3e23ea16d0a1da107
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 17ca11608481..3eceabe99d42 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -275,9 +275,13 @@ javaFrameworkError jfw_startVM(
index ++;
}
//add all options of the arOptions argument
+ std::vector<OString> convertedOptions;
for (auto const & ii: arOptions)
{
OString conv = OUStringToOString(ii, osl_getThreadTextEncoding());
+ convertedOptions.push_back(conv);
+ // keep conv.getStr() alive until after the call to
+ // jfw_plugin_startJavaVirtualMachine below
arOpt[index].optionString = const_cast<char *>(conv.getStr());
arOpt[index].extraInfo = nullptr;
index++;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits