Wire up work_around_app_jni_bugs.
This removes the cached value from struct JNIEnv. YAGNI.
Change-Id: Iad1a9182e86d7bf533af14000b99bb0340d6af9b
diff --git a/src/thread.cc b/src/thread.cc
index 6bee2c8..a0179d8 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -957,7 +957,7 @@
// Check if this is a local reference in the SIRT
if (SirtContains(obj)) {
result = *reinterpret_cast<Object**>(obj); // Read from SIRT
- } else if (jni_env_->work_around_app_jni_bugs) {
+ } else if (Runtime::Current()->GetJavaVM()->work_around_app_jni_bugs) {
// Assume an invalid local reference is actually a direct pointer.
result = reinterpret_cast<Object*>(obj);
} else {