diff --git a/unifiednlp-base/src/main/java/org/microg/tools/selfcheck/NlpStatusChecks.java b/unifiednlp-base/src/main/java/org/microg/tools/selfcheck/NlpStatusChecks.java index 0fdd76e..e692640 100644 --- a/unifiednlp-base/src/main/java/org/microg/tools/selfcheck/NlpStatusChecks.java +++ b/unifiednlp-base/src/main/java/org/microg/tools/selfcheck/NlpStatusChecks.java @@ -76,7 +76,8 @@ private boolean isNetworkLocationEnabled(Context context, ResultCollector collec private boolean isProvidingLastLocation(Context context, ResultCollector collector) { LocationManager locationManager = (LocationManager) context.getSystemService(LOCATION_SERVICE); Location location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); - boolean hasKnown = location != null && location.getExtras().containsKey(LOCATION_EXTRA_BACKEND_PROVIDER); + boolean hasKnown = location != null && location.getExtras() != null && + location.getExtras().containsKey(LOCATION_EXTRA_BACKEND_PROVIDER); collector.addResult(context.getString(R.string.self_check_name_last_location), hasKnown ? Positive : Unknown, context.getString(R.string.self_check_resolution_last_location)); return hasKnown;