diff options
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt index e64afd3..9718262 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt @@ -130,6 +130,9 @@ class UnitMapFragment : Fragment() { Log.d("UnitMapFragment", "Loading layer!") mapFragment.updateLayer(type) unitsViewModel.selectedUnit.value?.let { + if (it.position == null || it.position?.latitude == null || it.position?.longitude == null) { + return@let + } unitsViewModel.moveCamera( UnitsViewModel.Camera( point = Point2d( |