We might try to suspend a thread even before it's hit kStarting.
Not (yet) having a peer is also an indication we don't care and shouldn't FATAL.
Change-Id: I8a401a9ee99c513ac61b0fdab086db340b89239b
diff --git a/src/thread_list.cc b/src/thread_list.cc
index 1a342da..43a8561 100644
--- a/src/thread_list.cc
+++ b/src/thread_list.cc
@@ -75,7 +75,7 @@
#endif
if (delta == -1 && thread->suspend_count_ <= 0) {
// This is expected if you attach a thread during a GC.
- if (thread->GetState() != kStarting) {
+ if (thread->GetState() != kStarting && thread->GetPeer() != NULL) {
LOG(FATAL) << *thread << " suspend count already zero";
}
return;