Fix crash in MLD alternative search if source or target are invalid (#5851)
In situations where there is not a valid source or target phantom node (e.g. when snapping to an edge with a zero weight), a heap assertion will fail in the MLD alternative search code. We fix this by checking for empty heaps before proceeding with the search.
This commit is contained in:
@@ -93,6 +93,31 @@ Feature: Check zero speed updates
|
||||
| 1 | 2 | NoRoute |
|
||||
|
||||
|
||||
Scenario: Routing with alternatives on restricted way
|
||||
Given the node map
|
||||
"""
|
||||
a-1-b-2-c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| abc | no |
|
||||
And the contract extra arguments "--segment-speed-file {speeds_file}"
|
||||
And the customize extra arguments "--segment-speed-file {speeds_file}"
|
||||
And the speed file
|
||||
"""
|
||||
1,2,0
|
||||
2,1,0
|
||||
"""
|
||||
And the query options
|
||||
| alternatives | true |
|
||||
|
||||
|
||||
When I route I should get
|
||||
| from | to | code | alternative |
|
||||
| 1 | 2 | NoRoute | |
|
||||
|
||||
|
||||
Scenario: Routing on restricted oneway
|
||||
Given the node map
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user