From 66ad36f8f3e0d797768d729fb74c7608f3aad22e Mon Sep 17 00:00:00 2001 From: player-03 Date: Sun, 20 Nov 2022 11:51:56 -0500 Subject: [PATCH] Fix error when using JNI in macro context. --- src/lime/system/JNI.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lime/system/JNI.hx b/src/lime/system/JNI.hx index 749596be4..8b571633c 100644 --- a/src/lime/system/JNI.hx +++ b/src/lime/system/JNI.hx @@ -127,7 +127,7 @@ class JNI className = transformClassName(className); return new JNIMemberField(NativeCFFI.lime_jni_create_field(className, memberName, signature, false)); #else - return null; + return new JNIMemberField(null); #end } @@ -183,7 +183,7 @@ class JNI className = transformClassName(className); return new JNIStaticField(NativeCFFI.lime_jni_create_field(className, memberName, signature, true)); #else - return null; + return new JNIStaticField(null); #end } @@ -242,7 +242,7 @@ class JNI { initialized = true; - #if android + #if (android && !macro) var method = System.load("lime", "lime_jni_init_callback", 1); method(onCallback); #end