mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 22:11:29 +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 {
|
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user