bugfix nil check

This commit is contained in:
Robert Janetzko 2022-04-30 11:35:56 +00:00
parent cac7d87103
commit 6f3f13bdb7

View file

@ -19,7 +19,7 @@ func (srv *DfServer) RegisterWorldPage(path string, template string, accessor fu
}
data := accessor(mux.Vars(r))
if reflect.ValueOf(data).IsNil() {
if data == nil || (reflect.ValueOf(data).Kind() == reflect.Ptr && reflect.ValueOf(data).IsNil()) {
srv.notFound(w)
return
}