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

[Android] fix null activity crash #1150

Merged
merged 2 commits into from
Mar 21, 2017

Conversation

lelandrichardson
Copy link
Collaborator

to: @gpeal

This is same as #1148 but applied to master.

The fix is to not use getCurrentActivity() as the context to pass into MapView. This can be null at times, but the context passed into the view manager will not be.

Additionally, this removes a memory leak with setting the react context to an instance property on the view manager.

Fixes #1147

@lelandrichardson lelandrichardson merged commit 06ab2ec into master Mar 21, 2017
@lelandrichardson lelandrichardson deleted the lmr--fix-null-activity-crash branch March 21, 2017 19:04
rops pushed a commit to tt-sport-mobile/react-native-maps that referenced this pull request Mar 24, 2017
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.

Random crashes due to NPE on Context#getResources() on Android
2 participants