diff options
author | calderwoodra <calderwoodra@google.com> | 2017-09-08 10:55:04 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-09-11 13:49:04 -0700 |
commit | 9295405d7cdc6e97bbebce485710aafb8704c198 (patch) | |
tree | 62ed05e4dbd203a1cd1c2513fa368d0ca237c920 | |
parent | 50715261119b30e6e23aaf58fcf3e28f16430f3d (diff) |
Fix NPE in contacts fragment.
Bug: 64716624
Test: manual
PiperOrigin-RevId: 168017541
Change-Id: Ia8e581f19a0a9c4d45bacc4ab94e54131763640a
-rw-r--r-- | java/com/android/dialer/contactsfragment/ContactsFragment.java | 2 |
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); |