Fixed Crash where getActivity() returned null

Added a check to see if fragment is added to activity before setting
adapter: if(isAdded())