summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorcalderwoodra <calderwoodra@google.com>2017-09-08 10:55:04 -0700
committerEric Erfanian <erfanian@google.com>2017-09-11 13:49:04 -0700
commit9295405d7cdc6e97bbebce485710aafb8704c198 (patch)
tree62ed05e4dbd203a1cd1c2513fa368d0ca237c920 /java
parent50715261119b30e6e23aaf58fcf3e28f16430f3d (diff)
Fix NPE in contacts fragment.
Bug: 64716624 Test: manual PiperOrigin-RevId: 168017541 Change-Id: Ia8e581f19a0a9c4d45bacc4ab94e54131763640a
Diffstat (limited to 'java')
-rw-r--r--java/com/android/dialer/contactsfragment/ContactsFragment.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/com/android/dialer/contactsfragment/ContactsFragment.java b/java/com/android/dialer/contactsfragment/ContactsFragment.java
index ddf00b358..7d2097692 100644
--- a/java/com/android/dialer/contactsfragment/ContactsFragment.java
+++ b/java/com/android/dialer/contactsfragment/ContactsFragment.java
@@ -179,7 +179,7 @@ public class ContactsFragment extends Fragment
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
- if (cursor.getCount() == 0) {
+ if (cursor == null || cursor.getCount() == 0) {
emptyContentView.setDescription(R.string.all_contacts_empty);
emptyContentView.setActionLabel(R.string.all_contacts_empty_add_contact_action);
emptyContentView.setVisibility(View.VISIBLE);