Skip to content

Commit

Permalink
fix: trip-end receiver crash
Browse files Browse the repository at this point in the history
Signed-off-by: Amr Hossam <[email protected]>
  • Loading branch information
amrhossamdev authored and aaronbrethorst committed Oct 31, 2024
1 parent f940ff9 commit e253d6a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit e253d6a

Please sign in to comment.