cmd/coordinator: don't dereference nil buildlet.Client
Fixes #50457
Change-Id: I54d5c5337588d1ce640a6fc9934802bc5020f454
Reviewed-on: https://go-review.googlesource.com/c/build/+/375754
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
Trust: Michael Pratt <mpratt@google.com>
diff --git a/cmd/coordinator/buildstatus.go b/cmd/coordinator/buildstatus.go
index fc8d6e7..076d70f 100644
--- a/cmd/coordinator/buildstatus.go
+++ b/cmd/coordinator/buildstatus.go
@@ -1690,7 +1690,7 @@
} else {
state = "<font color='#700000'>failed</font>"
}
- if detail > singleLine {
+ if detail > singleLine && st.bc != nil {
fmt.Fprintf(&buf, "; <a href='%s'>%s</a>; %s", html.EscapeString(st.logsURLLocked()), state, html.EscapeString(st.bc.String()))
} else {
fmt.Fprintf(&buf, "; <a href='%s'>%s</a>", html.EscapeString(st.logsURLLocked()), state)