summaryrefslogtreecommitdiff
path: root/jvmfwk/source
diff options
context:
space:
mode:
Diffstat (limited to 'jvmfwk/source')
-rw-r--r--jvmfwk/source/framework.cxx4
1 files changed, 4 insertions, 0 deletions
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++;