From 687236ddb4c5bdb354717fa95c8e92cfcc5aa31c Mon Sep 17 00:00:00 2001 From: Kudo Chien Date: Fri, 14 Jun 2019 12:02:36 +0800 Subject: [PATCH] Fix Android native debug build assert crash --- ReactAndroid/src/main/jni/first-party/fb/jni/Exceptions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/jni/first-party/fb/jni/Exceptions.cpp b/ReactAndroid/src/main/jni/first-party/fb/jni/Exceptions.cpp index 326e114b20de7f..da17efa00cabda 100644 --- a/ReactAndroid/src/main/jni/first-party/fb/jni/Exceptions.cpp +++ b/ReactAndroid/src/main/jni/first-party/fb/jni/Exceptions.cpp @@ -122,13 +122,13 @@ void throwPendingJniExceptionAsCppException() { return; } - auto throwable = adopt_local(env->ExceptionOccurred()); + auto throwable = env->ExceptionOccurred(); if (!throwable) { throw std::runtime_error("Unable to get pending JNI exception."); } env->ExceptionClear(); - throw JniException(throwable); + throw JniException(adopt_local(throwable)); } void throwCppExceptionIf(bool condition) {