web: fix potential panic
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
410d1b97cd
commit
27e4c7027c
|
@ -51,8 +51,8 @@ func (w *Watcher) Check() {
|
|||
return
|
||||
}
|
||||
for _, t := range tenants.Results {
|
||||
if t.WebCertificate.IsSet() {
|
||||
err := w.cs.AddKeypair(*t.WebCertificate.Get())
|
||||
if kp := t.WebCertificate.Get(); kp != nil {
|
||||
err := w.cs.AddKeypair(*kp)
|
||||
if err != nil {
|
||||
w.log.WithError(err).Warning("failed to add certificate")
|
||||
}
|
||||
|
|
Reference in New Issue