Merge pull request #9700 from osmandapp/crash_default_speed

Fix #9658
This commit is contained in:
Vitaliy 2020-09-03 02:59:18 +03:00 committed by GitHub
commit 852996455e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -756,7 +756,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
final int[] maxValue = new int[1];
final int min;
final int max;
if (defaultSpeedOnly) {
if (defaultSpeedOnly || router == null) {
minValue[0] = Math.round(Math.min(1, settingsDefaultSpeed) * ratio[0]);
maxValue[0] = Math.round(Math.max(300, settingsDefaultSpeed) * ratio[0]);
min = minValue[0];