Index: jni/JniCallbacks.cpp |
diff --git a/jni/JniCallbacks.cpp b/jni/JniCallbacks.cpp |
index 407a0b0723f344f28442ad49048b473e7a5a3e96..1bc47e140a62d6f3c6300200b82c1faee2d4029e 100644 |
--- a/jni/JniCallbacks.cpp |
+++ b/jni/JniCallbacks.cpp |
@@ -42,8 +42,8 @@ void JniCallbackBase::CheckAndLogJavaException(JNIEnv* env) const |
{ |
if (env->ExceptionCheck()) |
{ |
- jthrowable throwable = env->ExceptionOccurred(); |
+ JniLocalReference<jthrowable> throwable(env, env->ExceptionOccurred()); |
env->ExceptionClear(); |
- LogException(env, throwable); |
+ LogException(env, *throwable); |
} |
} |