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) {