Fix Android JavaClassWrapper test crashes on API 26 and lower

(cherry picked from commit 8e5c352b482d892d169a4fd97e98f1fdc627c82a)
This commit is contained in:
Fredia Huya-Kouadio
2026-02-02 21:01:11 -08:00
committed by Thaddeus Crews
parent d338295d3e
commit 7c856efd30
2 changed files with 16 additions and 2 deletions
+5
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) {