summaryrefslogtreecommitdiff
path: root/libsanitizer/tsan
diff options
context:
space:
mode:
Diffstat (limited to 'libsanitizer/tsan')
-rw-r--r--libsanitizer/tsan/tsan_rtl_report.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/libsanitizer/tsan/tsan_rtl_report.cc b/libsanitizer/tsan/tsan_rtl_report.cc
index 11ec8381de6..f86cfd4681d 100644
--- a/libsanitizer/tsan/tsan_rtl_report.cc
+++ b/libsanitizer/tsan/tsan_rtl_report.cc
@@ -242,7 +242,8 @@ ThreadContext *IsThreadStackOrTls(uptr addr, bool *is_stack) {
void ScopedReport::AddThread(int unique_tid, bool suppressable) {
#ifndef TSAN_GO
- AddThread(FindThreadByUidLocked(unique_tid), suppressable);
+ if (const ThreadContext *tctx = FindThreadByUidLocked(unique_tid))
+ AddThread(tctx, suppressable);
#endif
}