Index: runtime/vm/profiler.cc |
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc |
index 21b8bf80871d4a778e0b9d3ea6951737ae2bb552..b8827c58e7f1109068c6035ea041db8114e01ae2 100644 |
--- a/runtime/vm/profiler.cc |
+++ b/runtime/vm/profiler.cc |
@@ -949,7 +949,9 @@ static uintptr_t __attribute__((noinline)) GetProgramCounter() { |
void Profiler::DumpStackTrace(bool native_stack_trace) { |
Thread* thread = Thread::Current(); |
- ASSERT(thread != NULL); |
+ if (thread == NULL) { |
+ return; |
+ } |
OSThread* os_thread = thread->os_thread(); |
ASSERT(os_thread != NULL); |
Isolate* isolate = thread->isolate(); |