mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 09:30:56 +00:00
fix the routerInfo is nil
This commit is contained in:
parent
24885c28f2
commit
876dce8e54
@ -798,7 +798,7 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
if !isRunnable {
|
||||
//Invoke the request handler
|
||||
var execController ControllerInterface
|
||||
if routerInfo.initialize != nil {
|
||||
if routerInfo != nil && routerInfo.initialize != nil {
|
||||
execController = routerInfo.initialize()
|
||||
} else {
|
||||
vc := reflect.New(runRouter)
|
||||
|
Loading…
Reference in New Issue
Block a user