Merge "nativeloader: Fix the case of search_path == null"

This commit is contained in:
Dimitry Ivanov 2016-05-09 19:17:10 +00:00 committed by Gerrit Code Review
commit 179fea40bb
1 changed files with 6 additions and 1 deletions

View File

@ -54,7 +54,12 @@ class LibraryNamespaces {
bool is_shared,
jstring java_library_path,
jstring java_permitted_path) {
ScopedUtfChars library_path(env, java_library_path);
std::string library_path; // empty string by default.
if (java_library_path != nullptr) {
ScopedUtfChars library_path_utf_chars(env, java_library_path);
library_path = library_path_utf_chars.c_str();
}
std::string permitted_path;
if (java_permitted_path != nullptr) {