diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2018-05-04 18:48:43 +0300 |
---|---|---|
committer | Arsentiy Milchakov <milcars@mapswithme.com> | 2018-05-07 10:11:11 +0300 |
commit | b26b117e077fea228dea4520446ee48fb9c4e1fe (patch) | |
tree | 9d698275650078ac2716570efaafa3ca03c5f44b | |
parent | dd6ee6e82f61b91346f29b65653c217101250ee8 (diff) |
[android] HandleJavaException crash 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 1236349687..9a1ea29396 100644 --- a/android/jni/com/mapswithme/core/jni_helper.cpp +++ b/android/jni/com/mapswithme/core/jni_helper.cpp @@ -219,11 +219,11 @@ bool HandleJavaException(JNIEnv * env) { if (env->ExceptionCheck()) { - const jthrowable e = env->ExceptionOccurred(); + jni::ScopedLocalRef<jthrowable> const e(env, env->ExceptionOccurred()); env->ExceptionDescribe(); env->ExceptionClear(); - my::LogLevel level = GetLogLevelForException(env, e); - LOG(level, (ToNativeString(env, e))); + my::LogLevel level = GetLogLevelForException(env, e.get()); + LOG(level, (ToNativeString(env, e.get()))); return true; } return false; |