summaryrefslogtreecommitdiffstats
path: root/runtime/jni_internal.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/jni_internal.cc')
-rw-r--r--runtime/jni_internal.cc5
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));