diff --git a/lib/web/apiserver.go b/lib/web/apiserver.go index dc9348c4f410d..d674d094248c8 100644 --- a/lib/web/apiserver.go +++ b/lib/web/apiserver.go @@ -1242,7 +1242,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 }