diff --git a/context.go b/context.go index e6856c7211..a56799411b 100644 --- a/context.go +++ b/context.go @@ -141,7 +141,9 @@ func (c *Context) HandlerName() string { func (c *Context) HandlerNames() []string { hn := make([]string, 0, len(c.handlers)) for _, val := range c.handlers { - hn = append(hn, nameOfFunction(val)) + if nil != val { + hn = append(hn, nameOfFunction(val)) + } } return hn }