Skip to content

Commit

Permalink
Fix crash in maplibre due to passing in null location to SymbolOptions
Browse files Browse the repository at this point in the history
This crash was seen twice by Firebase where there's far more likely to
be no valid location on the device.
  • Loading branch information
davecraig committed Feb 25, 2025
1 parent ce182be commit 9152206
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9152206

Please sign in to comment.