Navitia: Do not add leg if its duration is 0.

This commit is contained in:
Antonio El Khoury 2015-02-01 12:03:59 +01:00 committed by Andreas Schildbach
parent 4fe662d021
commit 335651ce5c

View file

@ -457,6 +457,10 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider
{ {
case CROW_FLY: case CROW_FLY:
{ {
// Return null leg if duration is 0.
if (legInfo.min == 0)
return null;
// Build type. // Build type.
final Individual.Type individualType = Individual.Type.WALK; final Individual.Type individualType = Individual.Type.WALK;