diff --git a/onebusaway-android/src/main/java/org/onebusaway/android/ui/TripDetailsListFragment.java b/onebusaway-android/src/main/java/org/onebusaway/android/ui/TripDetailsListFragment.java index 5be19cfeb..9f12b17d0 100644 --- a/onebusaway-android/src/main/java/org/onebusaway/android/ui/TripDetailsListFragment.java +++ b/onebusaway-android/src/main/java/org/onebusaway/android/ui/TripDetailsListFragment.java @@ -1231,7 +1231,9 @@ public void onReceive(Context context, Intent intent) { mAdapter.notifyDataSetChanged(); // Unregister this receiver now - getActivity().unregisterReceiver(this); + if(getActivity() != null) { + getActivity().unregisterReceiver(this); + } } } }