From 0b440ef78eae4f1c8558dca549e9c94a84f42639 Mon Sep 17 00:00:00 2001 From: Shih-wei Liao Date: Fri, 9 Mar 2012 13:05:11 -0800 Subject: Fix crashes. The bug was due to a refactoring error last night. We will also take out _artInvokeCommon and other confusing de-dup in the next CL. But I want to fix the crash right away. Change-Id: Ic3fcb0bbaaca44cf368f79994a0cdcfac5fdfc8b --- src/runtime_support_common.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/runtime_support_common.h b/src/runtime_support_common.h index d4da2def97..adab93616e 100644 --- a/src/runtime_support_common.h +++ b/src/runtime_support_common.h @@ -282,6 +282,9 @@ uint64_t artInvokeCommon(uint32_t method_idx, Object* this_object, Method* calle Thread* self, Method** sp, bool access_check, InvokeType type){ Method* method = _artInvokeCommon(method_idx, this_object, caller_method, self, sp, access_check, type); + if (method == NULL) { + return 0; // failure + } const void* code = method->GetCode(); uint32_t method_uint = reinterpret_cast(method); -- cgit v1.2.3-59-g8ed1b