Fix in endpoint Info() method

- Make sure to return the proper value for the
  EndpointInfo interface in case of nil implementer

Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
Alessandro Boch 2015-11-22 21:44:06 -08:00
parent 8b079865c7
commit d778845791
1 changed files with 5 additions and 1 deletions

View File

@ -159,7 +159,11 @@ func (ep *endpoint) Info() EndpointInfo {
return ep
}
return sb.getEndpoint(ep.ID())
if epi := sb.getEndpoint(ep.ID()); epi != nil {
return epi
}
return nil
}
func (ep *endpoint) DriverInfo() (map[string]interface{}, error) {