Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] - prevent null pointer when receiving connectivity change e…
Browse files Browse the repository at this point in the history
…vents while destroying the underlying map (#6858)
  • Loading branch information
tobrun committed Oct 31, 2016
1 parent 39d5cb3 commit 38ee340
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2552,7 +2552,7 @@ private class ConnectivityReceiver extends BroadcastReceiver {
// Called when an action we are listening to in the manifest has been sent
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
if (!destroyed && intent.getAction().equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
boolean noConnectivity = intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false);
onConnectivityChanged(!noConnectivity);
}
Expand Down

0 comments on commit 38ee340

Please sign in to comment.