From a1d6c020281fc923666e1699a3b232589b50d04a Mon Sep 17 00:00:00 2001 From: The Judge Date: Wed, 18 Dec 2024 21:00:56 -0800 Subject: [PATCH] Fix invalid jnienv --- src/main/jni/vloader.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/jni/vloader.cpp b/src/main/jni/vloader.cpp index 5496da05..54820d49 100644 --- a/src/main/jni/vloader.cpp +++ b/src/main/jni/vloader.cpp @@ -55,9 +55,7 @@ JNIEXPORT void JNICALL Java_org_vivecraft_util_VLoader_setupAndroid(JNIEnv* env, jclass clazz) { JNIEnv *newEnv; pojav_environ->dalvikJavaVMPtr->AttachCurrentThread(&newEnv, NULL); - - pojav_environ->dalvikJNIEnvPtr_ANDROID = newEnv; - newEnv->CallStaticVoidMethod(pojav_environ->bridgeClazz, pojav_environ->method_stopXR); + pojav_environ->dalvikJNIEnvPtr_ANDROID->CallStaticVoidMethod(pojav_environ->bridgeClazz, pojav_environ->method_stopXR); } extern "C"