I think it was happening when the view was being discarded or the activity was being detached. 

Seems like we need to monitor these methods (onAttach, onDetach) instead of getActivity()

http://developer.android.com/reference/android/app/Fragment.html#onAttach(android.app.Activity)
http://developer.android.com/reference/android/app/Fragment.html#onDetach()