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

Remove navigation listeners before clearing NavigationEngineFactory #1140

Merged
merged 1 commit into from Jul 23, 2018

Conversation

danesfeder
Copy link
Contributor

@danesfeder danesfeder commented Jul 23, 2018

Fixes #1139

Clearing the engines in NavigationEngineFactory should be the last thing we do when shutting down in onDestroy (after we remove listeners as well) https://github.com/mapbox/mapbox-navigation-android/compare/dan-off-route-npe?expand=1#diff-667eeafdcc4161cea7ec77c7be674b6fR215

This way, it's not possible for updates to query the engines because the listeners are already removed before we clear the engines. This PR also adds logic to ignore null engines in NavigationEngineFactory.

@danesfeder danesfeder added bug Defect to be fixed. navigation-core labels Jul 23, 2018
@danesfeder danesfeder added this to the 0.17.0 milestone Jul 23, 2018
@danesfeder danesfeder self-assigned this Jul 23, 2018
Copy link
Contributor

@Guardiola31337 Guardiola31337 left a comment

Choose a reason for hiding this comment

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

Thanks for the quick work on this @danesfeder

🚢

@danesfeder danesfeder merged commit 37349a9 into master Jul 23, 2018
@danesfeder danesfeder deleted the dan-off-route-npe branch July 23, 2018 15:52
@Guardiola31337 Guardiola31337 mentioned this pull request Aug 10, 2018
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defect to be fixed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants