Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsentiy Milchakov <milcars@mapswithme.com>2018-05-04 18:48:43 +0300
committerArsentiy Milchakov <milcars@mapswithme.com>2018-05-07 10:11:11 +0300
commitb26b117e077fea228dea4520446ee48fb9c4e1fe (patch)
tree9d698275650078ac2716570efaafa3ca03c5f44b
parentdd6ee6e82f61b91346f29b65653c217101250ee8 (diff)
[android] HandleJavaException crash fix
-rw-r--r--android/jni/com/mapswithme/core/jni_helper.cpp6
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;