diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2018-05-07 11:17:22 +0300 |
---|---|---|
committer | Aleksandr Zatsepin <alexzatsepin@users.noreply.github.com> | 2018-05-07 11:26:36 +0300 |
commit | 0e657ac385dbe06772abd4c06c9f8d26e9a2ed42 (patch) | |
tree | ccda8f05e6fd5d75b477697f2aa938c8dcec6472 | |
parent | 596b0426c8215b8916a0e5b3b40182c62dd14f0f (diff) |
[jni] link leaking fix.
-rw-r--r-- | android/jni/com/mapswithme/core/jni_helper.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/android/jni/com/mapswithme/core/jni_helper.cpp b/android/jni/com/mapswithme/core/jni_helper.cpp index 9a1ea29396..d862623a5c 100644 --- a/android/jni/com/mapswithme/core/jni_helper.cpp +++ b/android/jni/com/mapswithme/core/jni_helper.cpp @@ -219,7 +219,7 @@ bool HandleJavaException(JNIEnv * env) { if (env->ExceptionCheck()) { - jni::ScopedLocalRef<jthrowable> const e(env, env->ExceptionOccurred()); + jni::ScopedLocalRef<jthrowable> const e(env, env->ExceptionOccurred()); env->ExceptionDescribe(); env->ExceptionClear(); my::LogLevel level = GetLogLevelForException(env, e.get()); @@ -251,12 +251,12 @@ std::string DescribeException() if (env->ExceptionCheck()) { - jthrowable e = env->ExceptionOccurred(); + jni::ScopedLocalRef<jthrowable> const e(env, env->ExceptionOccurred()); // have to clear the exception before JNI will work again. env->ExceptionClear(); - return ToNativeString(env, e); + return ToNativeString(env, e.get()); } return {}; } |