fix: Fix possible null-pointer error in convertJNIObjectToJSIValue
This commit is contained in:
parent
bb0a09d2a1
commit
c47639d86a
@ -102,7 +102,12 @@ jobject JSIJNIConversion::convertJSIValueToJNIObject(jsi::Runtime &runtime, cons
|
||||
}
|
||||
|
||||
jsi::Value JSIJNIConversion::convertJNIObjectToJSIValue(jsi::Runtime &runtime, const jni::local_ref<jobject>& object) {
|
||||
if (object->isInstanceOf(jni::JBoolean::javaClassStatic())) {
|
||||
if (object == nullptr) {
|
||||
// null
|
||||
|
||||
return jsi::Value::undefined();
|
||||
|
||||
} else if (object->isInstanceOf(jni::JBoolean::javaClassStatic())) {
|
||||
// Boolean
|
||||
|
||||
static const auto getBooleanFunc = jni::findClassLocal("java/lang/Boolean")->getMethod<jboolean()>("booleanValue");
|
||||
|
Loading…
Reference in New Issue
Block a user