From 5ba40cd6f8dc70b2cdfccacae6290e9318336600 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Sat, 19 Sep 2020 09:09:30 +0100 Subject: [PATCH] fix panic when jfa-go user has no email set with jellyfin_login --- api.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api.go b/api.go index 380bf8d..9dab851 100644 --- a/api.go +++ b/api.go @@ -454,7 +454,9 @@ func (app *appContext) GetInvites(gc *gin.Context) { var address string if app.config.Section("ui").Key("jellyfin_login").MustBool(false) { app.storage.loadEmails() - address = app.storage.emails[gc.GetString("jfId")].(string) + if addr := app.storage.emails[gc.GetString("jfId")]; addr != nil { + address = addr.(string) + } } else { address = app.config.Section("ui").Key("email").String() }