From 1a9b3bf23847031adda379a56dea84f7e094d263 Mon Sep 17 00:00:00 2001 From: erfanian Date: Fri, 22 Jun 2018 17:45:35 -0700 Subject: Make sure we have a context before we use it. Test: none PiperOrigin-RevId: 201767444 Change-Id: Id4622886ba7ebc8a3e2a3b2cfa5d80bdfd8c885f --- java/com/android/dialer/searchfragment/list/NewSearchFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3