summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author TDYa127 <tdy@google.com> 2012-04-03 17:40:49 -0700
committer Shih-wei Liao <sliao@google.com> 2012-04-03 23:27:29 -0700
commit20efe54063f2740d16f01190b280cdba384c869b (patch)
tree271e06250a2f738901c632bdca91dd4d8dcc52eb /src
parent64f884de66d0eb888a215e276f9b10ade0690413 (diff)
Fix the GetCurrentMethod bug.
Change-Id: I1f28dd991ed209afe42d785887bc15344baa4526
Diffstat (limited to 'src')
-rw-r--r--src/thread.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/thread.cc b/src/thread.cc
index 10b099d48a..64f618c9ee 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -1594,8 +1594,8 @@ Method* Thread::GetCurrentMethod(uintptr_t* pc, Method*** sp) const {
#else
Method* Thread::GetCurrentMethod(uintptr_t*, Method***) const {
ShadowFrame* frame = top_shadow_frame_;
- while (frame->GetMethod()->IsNative()) {
- frame = frame->GetLink();
+ if (frame == NULL) {
+ return NULL;
}
return frame->GetMethod();
}