small update to maxSpeed conditions

This commit is contained in:
sonora 2016-07-26 01:09:02 +02:00
parent 740e81e1e2
commit c9dbc3e5e1

View file

@ -398,8 +398,10 @@ public class RouteInfoWidgetsFactory {
} }
mx = ro.getMaximumSpeed(direction); mx = ro.getMaximumSpeed(direction);
} }
} else { } else if (rh != null) {
mx = rh.getCurrentMaxSpeed(); mx = rh.getCurrentMaxSpeed();
} else {
mx = 0f;
} }
if (cachedSpeed != mx) { if (cachedSpeed != mx) {
cachedSpeed = mx; cachedSpeed = mx;