Prevent NPE

master
M66B 2 months ago
parent 22762e6c64
commit 6c835d8ab1

@ -1142,7 +1142,7 @@ public class MessageHelper {
ContactsContract.Contacts._ID, ContactsContract.Contacts._ID,
ContactsContract.Contacts.DISPLAY_NAME_PRIMARY, ContactsContract.Contacts.DISPLAY_NAME_PRIMARY,
}, null, null, null)) { }, null, null, null)) {
if (cursor.moveToFirst()) { if (cursor != null && cursor.moveToFirst()) {
String contactId = cursor.getString(0); String contactId = cursor.getString(0);
String display = cursor.getString(1); String display = cursor.getString(1);

Loading…
Cancel
Save