From 91522062ed65c53d68993916227f99907ab37ea4 Mon Sep 17 00:00:00 2001 From: Dave Craig Date: Tue, 25 Feb 2025 17:17:17 +0000 Subject: [PATCH] Fix crash in maplibre due to passing in null location to SymbolOptions This crash was seen twice by Firebase where there's far more likely to be no valid location on the device. --- .../soundscape/screens/home/home/MapContainerLibre.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/scottishtecharmy/soundscape/screens/home/home/MapContainerLibre.kt b/app/src/main/java/org/scottishtecharmy/soundscape/screens/home/home/MapContainerLibre.kt index 061c09c7..bbc8bc1b 100644 --- a/app/src/main/java/org/scottishtecharmy/soundscape/screens/home/home/MapContainerLibre.kt +++ b/app/src/main/java/org/scottishtecharmy/soundscape/screens/home/home/MapContainerLibre.kt @@ -130,7 +130,7 @@ fun MapContainerLibre( val symbolOptions = remember(userLocation, userSymbolRotation) { SymbolOptions() - .withLatLng(userLocation?.toLatLng()) + .withLatLng(userLocation?.toLatLng() ?: LatLng()) .withIconImage(USER_POSITION_MARKER_NAME) .withIconAnchor("center") .withIconRotate(userSymbolRotation)