mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Fix crash when null value through jni on android
(cherry picked from commit b09dbaa78e
)
This commit is contained in:
parent
f9b7baa546
commit
8aeacd935c
@ -238,6 +238,10 @@ String _get_class_name(JNIEnv * env, jclass cls, bool* array) {
|
||||
|
||||
Variant _jobject_to_variant(JNIEnv * env, jobject obj) {
|
||||
|
||||
if (obj == NULL) {
|
||||
return Variant();
|
||||
}
|
||||
|
||||
jclass c = env->GetObjectClass(obj);
|
||||
bool array;
|
||||
String name = _get_class_name(env, c, &array);
|
||||
|
Loading…
Reference in New Issue
Block a user