Skip to content

Fixed asynchronous Activity leaks in Fragments

Ernir Erlingsson requested to merge 714-asynchronous-context-leaks into master

If a Fragment has been detached its getActivity() method will return null, providing numerous crash possibilities within the app.

My approach to fixing this is to make Fragments use their own runOnUiThreadUnlessDestroyed method, which also checks if the Fragment has been detached before running the Runnable

Closes #714 (closed)

Merge request reports