diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-03-10 17:19:39 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-03-10 17:19:39 +0200 |
commit | dcc9c06d34aff4853a594dc4029b7594d3f20d1e (patch) | |
tree | 03a92a0853d75c034f8a431237fb2a577b357180 | |
parent | 38ee16d81d5d6c41f9babc1ee2cf7bb2648704d6 (diff) |
java: system.load graceful fail
-rw-r--r-- | src/libjvm-java.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libjvm-java.c b/src/libjvm-java.c index 4e0902d..6bccb70 100644 --- a/src/libjvm-java.c +++ b/src/libjvm-java.c @@ -16,8 +16,9 @@ java_lang_System_load(JNIEnv *env, jobject object, va_list args) const char *lib = (*env)->GetStringUTFChars(env, va_arg(args, jstring), NULL); verbose("%s", lib); - void *handle = bionic_dlopen(lib, RTLD_NOW | RTLD_GLOBAL); - assert(handle); + void *handle; + if (!(handle = bionic_dlopen(lib, RTLD_NOW | RTLD_GLOBAL))) + return; union { void *ptr; |