aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap/TrackerMap/android
diff options
context:
space:
mode:
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap/android')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt3
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(