diff options
| author | 2015-04-24 23:08:43 +0000 | |
|---|---|---|
| committer | 2015-04-24 23:08:43 +0000 | |
| commit | 63921cfe407e093a527c94f5e01b03e89669f18a (patch) | |
| tree | 352419c2905d1267accad095bc8a0c91815dac31 | |
| parent | 233f1575843c6f94d96be90ba145a2623bff6d8f (diff) | |
| parent | 16b5d29f1755e50ab92a3bee0b85b26460e69cf8 (diff) | |
am 16b5d29f: Merge "Guard against name == null in ShortDump"
* commit '16b5d29f1755e50ab92a3bee0b85b26460e69cf8':
Guard against name == null in ShortDump
| -rw-r--r-- | runtime/thread.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/thread.cc b/runtime/thread.cc index b27ad4ae3e..9f7c303af9 100644 --- a/runtime/thread.cc +++ b/runtime/thread.cc @@ -572,13 +572,13 @@ void Thread::ShortDump(std::ostream& os) const { if (GetThreadId() != 0) { // If we're in kStarting, we won't have a thin lock id or tid yet. os << GetThreadId() - << ",tid=" << GetTid() << ','; + << ",tid=" << GetTid() << ','; } os << GetState() - << ",Thread*=" << this - << ",peer=" << tlsPtr_.opeer - << ",\"" << *tlsPtr_.name << "\"" - << "]"; + << ",Thread*=" << this + << ",peer=" << tlsPtr_.opeer + << ",\"" << (tlsPtr_.name != nullptr ? *tlsPtr_.name : "null") << "\"" + << "]"; } void Thread::Dump(std::ostream& os) const { |