Merge "Fix single-step in native thread"
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index 0752c59..728e8e3 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -3703,7 +3703,9 @@
 
   mirror::ArtMethod* m = single_step_control->GetMethod();
   const int32_t line_number = visitor.line_number;
-  if (!m->IsNative()) {
+  // Note: if the thread is not running Java code (pure native thread), there is no "current"
+  // method on the stack (and no line number either).
+  if (m != nullptr && !m->IsNative()) {
     const DexFile::CodeItem* const code_item = m->GetCodeItem();
     DebugCallbackContext context(single_step_control, line_number, code_item);
     m->GetDexFile()->DecodeDebugInfo(code_item, m->IsStatic(), m->GetDexMethodIndex(),