diff --git a/lib/web/apiserver.go b/lib/web/apiserver.go index 28b9db91c9adc..1eb879ba33cfa 100644 --- a/lib/web/apiserver.go +++ b/lib/web/apiserver.go @@ -1251,7 +1251,7 @@ func (h *Handler) getUserContext(w http.ResponseWriter, r *http.Request, p httpr if err != nil { return nil, trace.Wrap(err) } - if !pingResp.LicenseExpiry.IsZero() { + if pingResp.LicenseExpiry != nil && !pingResp.LicenseExpiry.IsZero() { userContext.Cluster.LicenseExpiry = pingResp.LicenseExpiry }