Index: runtime/vm/thread_interrupter.cc |
diff --git a/runtime/vm/thread_interrupter.cc b/runtime/vm/thread_interrupter.cc |
index 3ba1231e3929172627bdd9e4204930f04002010f..23e6c22fc4df17365db199763c694b035edc0769 100644 |
--- a/runtime/vm/thread_interrupter.cc |
+++ b/runtime/vm/thread_interrupter.cc |
@@ -226,7 +226,8 @@ InterruptableThreadState* ThreadInterrupter::GetCurrentThreadState() { |
InterruptableThreadState* ThreadInterrupter::CurrentThreadState() { |
- return Thread::Current()->thread_state(); |
+ Thread* thread = Thread::Current(); |
+ return (thread == NULL) ? NULL : thread->thread_state(); |
} |