diff options
-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); |