Fix crash in settings
This commit is contained in:
parent
e5781e92ba
commit
9287b9419d
1 changed files with 5 additions and 1 deletions
|
@ -42,6 +42,7 @@ import net.osmand.plus.OsmandSettings.DrivingRegion;
|
|||
import net.osmand.plus.OsmandSettings.MetricsConstants;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.Version;
|
||||
import net.osmand.plus.base.MapViewTrackingUtilities;
|
||||
import net.osmand.plus.dashboard.DashChooseAppDirFragment;
|
||||
import net.osmand.plus.dashboard.DashChooseAppDirFragment.ChooseAppDirFragment;
|
||||
import net.osmand.plus.dashboard.DashChooseAppDirFragment.MoveFilesToDifferentDirectory;
|
||||
|
@ -160,7 +161,10 @@ public class SettingsGeneralActivity extends SettingsBaseActivity implements OnR
|
|||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (drs.get(which) == null) {
|
||||
settings.DRIVING_REGION_AUTOMATIC.set(true);
|
||||
MapActivity.getSingleMapViewTrackingUtilities().resetDrivingRegionUpdate();
|
||||
MapViewTrackingUtilities mapViewTrackingUtilities = MapActivity.getSingleMapViewTrackingUtilities();
|
||||
if (mapViewTrackingUtilities != null) {
|
||||
mapViewTrackingUtilities.resetDrivingRegionUpdate();
|
||||
}
|
||||
} else {
|
||||
settings.DRIVING_REGION_AUTOMATIC.set(false);
|
||||
settings.DRIVING_REGION.set(drs.get(which));
|
||||
|
|
Loading…
Reference in a new issue