Fix segv in allocation tracking.
Change-Id: I19b729c94b8037b16a220af2213e8d4bfa92e04d
diff --git a/src/debugger.cc b/src/debugger.cc
index 342d548..e928b46 100644
--- a/src/debugger.cc
+++ b/src/debugger.cc
@@ -3049,8 +3049,8 @@
MethodHelper mh;
for (size_t i = 0; i < kMaxAllocRecordStackDepth; i++) {
Method* m = record->stack[i].method;
- mh.ChangeMethod(m);
if (m != NULL) {
+ mh.ChangeMethod(m);
class_names.Add(mh.GetDeclaringClassDescriptor());
method_names.Add(mh.GetName());
filenames.Add(mh.GetDeclaringClassSourceFile());