Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Check if renderer is not destroyed before delivering snapshot #11800

Merged
merged 1 commit into from May 2, 2018

Conversation

LukasPaczos
Copy link
Member

When we are posting the snapshot callback back to the main thread, from the render thread, the Activity can be already destroyed and therefore the peer is destroyed as well. This PR adds a check if the renderer (therefore the NativeMapView peer) is not destroyed before delivering the callback.

Also, I removed changes from #11358 as they seem obsolete now, not 100% sure as I wasn't able to reproduce the issue presented in the #11358 after removing that workaround anyway. @tobrun would you mind rechecking that? Happy to bring them back if it's still an issue.

@LukasPaczos LukasPaczos added the Android Mapbox Maps SDK for Android label Apr 30, 2018
@LukasPaczos LukasPaczos added this to the android-v6.1.0 milestone Apr 30, 2018
Copy link
Member

@tobrun tobrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find 👍 validated that it fixes the crash.

@tobrun tobrun merged commit cf4b4e7 into master May 2, 2018
This was referenced May 4, 2018
@LukasPaczos LukasPaczos deleted the lp-hardening-shapshots branch May 10, 2018 09:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants