diff --git a/core/src/main/cpp/main/include/art/runtime/hidden_api.h b/core/src/main/cpp/main/include/art/runtime/hidden_api.h index 2d2adf58..5b629140 100644 --- a/core/src/main/cpp/main/include/art/runtime/hidden_api.h +++ b/core/src/main/cpp/main/include/art/runtime/hidden_api.h @@ -40,6 +40,7 @@ namespace art { inline void maybeSetTrusted(JNIEnv *env, jclass clazz, jobject class_loader, jobject j_cookie) { + if (env->ExceptionCheck()) return; static auto get_parent = env->GetMethodID(env->FindClass("java/lang/ClassLoader"), "getParent", "()Ljava/lang/ClassLoader;"); for (auto current = lspd::Context::GetInstance()->GetCurrentClassLoader();