Fixed another crash if contact name is empty

This commit is contained in:
Sylvain Berfini 2016-04-29 11:01:09 +02:00
parent d399aaeda6
commit ac73829739

View file

@ -481,7 +481,10 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
separator.setVisibility(View.GONE);
} else {
separator.setVisibility(View.VISIBLE);
separatorText.setText(String.valueOf(contact.getFullName().charAt(0)));
String fullName = contact.getFullName();
if (fullName != null && !fullName.isEmpty()) {
separatorText.setText(String.valueOf(fullName.charAt(0)));
}
}
ImageView icon = (ImageView) view.findViewById(R.id.contact_picture);