Prevent crash

This commit is contained in:
M66B 2021-08-04 21:37:04 +02:00
parent 5d0c651a9a
commit d561cd7d7a
1 changed files with 32 additions and 30 deletions

View File

@ -2524,6 +2524,7 @@ public class FragmentCompose extends FragmentBase {
if (cursor != null && cursor.moveToFirst()) {
int colEmail = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Email.ADDRESS);
int colName = cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME);
if (colEmail >= 0 && colName >= 0) {
String email = MessageHelper.sanitizeEmail(cursor.getString(colEmail));
String name = cursor.getString(colName);
@ -2563,6 +2564,7 @@ public class FragmentCompose extends FragmentBase {
}
}
}
}
return draft;
}