Skip to content

fix(android): guard MapView.addFeature against re-parenting non-map c…#31

Merged
witcher-shailesh merged 1 commit into
master-testfrom
mapview-addFeature-child-null-check
Apr 29, 2026
Merged

fix(android): guard MapView.addFeature against re-parenting non-map c…#31
witcher-shailesh merged 1 commit into
master-testfrom
mapview-addFeature-child-null-check

Conversation

@gopalchobey9

Copy link
Copy Markdown

…hildren

The catch-all branch in MapView.addFeature() called addView(child, index) without first removing the child from any existing parent, producing "The specified child already has a parent" IllegalStateException on Fabric re-mounts. Mirror the existing guard used for the MapMarker branch, and iterate ViewGroup children in reverse so removals during recursion don't shift indices.

Does any other open PR do the same thing?

(please answer here)

What issue is this PR fixing?

(please link the issue here)

How did you test this PR?

(please answer here)

…hildren

The catch-all branch in MapView.addFeature() called addView(child, index)
without first removing the child from any existing parent, producing
"The specified child already has a parent" IllegalStateException on
Fabric re-mounts. Mirror the existing guard used for the MapMarker branch,
and iterate ViewGroup children in reverse so removals during recursion
don't shift indices.
@witcher-shailesh
witcher-shailesh merged commit 320d79d into master-test Apr 29, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants