Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polygon Composable crashes on empty list of points #666

Closed
bubenheimer opened this issue Dec 30, 2024 · 1 comment · Fixed by #667
Closed

Polygon Composable crashes on empty list of points #666

bubenheimer opened this issue Dec 30, 2024 · 1 comment · Fixed by #667
Labels
released triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@bubenheimer
Copy link
Contributor

Environment details

  1. android-maps-compose
  2. 6.4.0

Code example

Polygon(emptyList())

Stack trace

com.google.maps.api.android.lib6.common.apiexception.b: List<LatLng> cannot be empty

Crashing when passing an empty list of points is a) undocumented and b) unacceptable. While this may reflect the behavior of the SDK when not passing any points, it is not suitable behavior for any Composable function.

@bubenheimer bubenheimer added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Dec 30, 2024
bubenheimer added a commit to bubenheimer/android-maps-compose that referenced this issue Dec 30, 2024
bubenheimer added a commit to bubenheimer/android-maps-compose that referenced this issue Dec 30, 2024
@dkhawk dkhawk closed this as completed in 1310804 Jan 2, 2025
googlemaps-bot pushed a commit that referenced this issue Jan 2, 2025
## [6.4.1](v6.4.0...v6.4.1) (2025-01-02)

### Bug Fixes

* avoid Polygon crash on empty list of points ([#667](#667)) ([1310804](1310804)), closes [#666](#666)
@googlemaps-bot
Copy link
Contributor

🎉 This issue has been resolved in version 6.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants