Karumi / Dexter

Android library that simplifies the process of requesting permissions at runtime.
http://karumi.com
Apache License 2.0
5.23k stars 671 forks source link

NPE tentative fix for DexterInstance #246

Closed pedrovgs closed 4 years ago

pedrovgs commented 4 years ago

:pushpin: References

:tophat: What is the goal?

Tentative fix for a NPE found by our users. Nobody can reproduce this error but based on the trace we think the OS could be killing the activity and we'd not be checking if it's still available by DexterInstance. If you look at DexterInstance#127 you'll see this is the only point where the activity instance is assigned back to null.

I've also prepared this repository for the next release. Dexter 6.0.1.

:memo: How is it being implemented?

I've protected the code failing with a NPE. I hope this fixes the issue.

:robot: How can it be tested?

I couldn't add any manual or automated test reproducing this error.

Serchinastico commented 4 years ago

Hope this fixes it for the great good! 💃