Fix Android JavaClassWrapper test crashes on API 26 and lower

This commit is contained in:
Fredia Huya-Kouadio 2026-02-02 21:01:11 -08:00
parent 2487a297b2
commit 8e5c352b48
2 changed files with 16 additions and 2 deletions

View file

@ -44,6 +44,11 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method,
ERR_FAIL_NULL_V(env, false);
env->PushLocalFrame(p_argcount);
if (env->ExceptionCheck()) {
env->ExceptionDescribe();
env->ExceptionClear();
return false;
}
MethodInfo *method = nullptr;
for (MethodInfo &E : M->value) {