From dcc9c06d34aff4853a594dc4029b7594d3f20d1e Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Sat, 10 Mar 2018 17:19:39 +0200 Subject: java: system.load graceful fail --- src/libjvm-java.c | 5 +++-- 1 file 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; -- cgit v1.2.3