summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/com/android/dialer/searchfragment/list/NewSearchFragment.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java
index fd6db75e9..65ce87340 100644
--- a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java
+++ b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java
@@ -404,7 +404,7 @@ public final class NewSearchFragment extends Fragment
}
// If the user dismissed the prompt without granting us the permission, don't load the cursor.
- if (!PermissionsUtil.hasLocationPermissions(getContext())) {
+ if (getContext() == null || !PermissionsUtil.hasLocationPermissions(getContext())) {
return;
}