diff options
Diffstat (limited to 'runtime/jni_internal.cc')
-rw-r--r-- | runtime/jni_internal.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/jni_internal.cc b/runtime/jni_internal.cc index 083f179f38..0624281c20 100644 --- a/runtime/jni_internal.cc +++ b/runtime/jni_internal.cc @@ -684,6 +684,11 @@ class JNI { static void ExceptionDescribe(JNIEnv* env) { ScopedObjectAccess soa(env); + // If we have no exception to describe, pass through. + if (!soa.Self()->GetException(nullptr)) { + return; + } + StackHandleScope<3> hs(soa.Self()); // TODO: Use nullptr instead of null handles? auto old_throw_this_object(hs.NewHandle<mirror::Object>(nullptr)); |