diff --git a/tool/tsh/tsh.go b/tool/tsh/tsh.go index 4f8c1dc9547fb..414acee902ef0 100644 --- a/tool/tsh/tsh.go +++ b/tool/tsh/tsh.go @@ -1057,7 +1057,7 @@ func onListClusters(cf *CLIConf) { utils.FatalError(err) } showActive := func(cluster services.RemoteCluster) string { - if profile.Cluster == cluster.GetName() { + if profile != nil && cluster.GetName() == profile.Cluster { return "*" } return ""