summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-04-24 23:08:43 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-04-24 23:08:43 +0000
commit63921cfe407e093a527c94f5e01b03e89669f18a (patch)
tree352419c2905d1267accad095bc8a0c91815dac31
parent233f1575843c6f94d96be90ba145a2623bff6d8f (diff)
parent16b5d29f1755e50ab92a3bee0b85b26460e69cf8 (diff)
am 16b5d29f: Merge "Guard against name == null in ShortDump"
* commit '16b5d29f1755e50ab92a3bee0b85b26460e69cf8': Guard against name == null in ShortDump
-rw-r--r--runtime/thread.cc10
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 {