summaryrefslogtreecommitdiff
path: root/runtime/method_handles.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/method_handles.cc')
-rw-r--r--runtime/method_handles.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/method_handles.cc b/runtime/method_handles.cc
index a91348ae63..741ec0d84d 100644
--- a/runtime/method_handles.cc
+++ b/runtime/method_handles.cc
@@ -466,6 +466,11 @@ ArtMethod* RefineTargetMethod(Thread* self,
// String constructors are replaced with static StringFactory methods when a MethodHandle
// object is created.
DCHECK(!target_method->IsStringConstructor());
+ ObjPtr<mirror::Object> receiver(shadow_frame.GetVRegReference(receiver_reg));
+ if (receiver == nullptr) {
+ ThrowNullPointerException("null receiver");
+ return nullptr;
+ }
} else if (handle_kind == mirror::MethodHandle::Kind::kInvokeSuper) {
// Note that we're not dynamically dispatching on the type of the receiver
// here. We use the static type of the "receiver" object that we've