Commit 876dce8e authored by astaxie's avatar astaxie

fix the routerInfo is nil

parent 24885c28
...@@ -798,7 +798,7 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -798,7 +798,7 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
if !isRunnable { if !isRunnable {
//Invoke the request handler //Invoke the request handler
var execController ControllerInterface var execController ControllerInterface
if routerInfo.initialize != nil { if routerInfo != nil && routerInfo.initialize != nil {
execController = routerInfo.initialize() execController = routerInfo.initialize()
} else { } else {
vc := reflect.New(runRouter) vc := reflect.New(runRouter)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment