Enha: avoid nil panics
This commit is contained in:
@ -75,8 +75,9 @@ func HandleExit(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
fi, err := getFullInfoByCtx(r.Context())
|
||||
if err != nil {
|
||||
abortWithError(w, err.Error())
|
||||
if err != nil || fi == nil {
|
||||
log.Error("failed to fetch fi", "error", err)
|
||||
http.Redirect(w, r, "/", 302)
|
||||
return
|
||||
}
|
||||
if fi.Room.IsRunning {
|
||||
|
Reference in New Issue
Block a user