This commit is contained in:
Arnaud Delcasse 2023-03-29 18:31:29 +02:00
parent 761449b828
commit d535e945ff
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ func (v *ValhallaRouting) Route(locations []orb.Point) (route *Route, err error)
return nil, err
}
if len(resp.Directions.Routes) < 1 {
if resp.Directions == nil || resp.Directions.Routes == nil || len(resp.Directions.Routes) < 1 {
return nil, errors.New("no routes returnes by valhalla")
}