From 9a2c372c23c05eeac68e4326bbdee0cda74c1e48 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Mon, 23 Mar 2015 12:32:51 -0700 Subject: [PATCH] fix crash on android contact weirdness Fixes #2722 Closes #2758 // FREEBIE --- src/org/thoughtcrime/securesms/contacts/ContactsDatabase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/contacts/ContactsDatabase.java b/src/org/thoughtcrime/securesms/contacts/ContactsDatabase.java index a4d48e1c40..b8199f545d 100644 --- a/src/org/thoughtcrime/securesms/contacts/ContactsDatabase.java +++ b/src/org/thoughtcrime/securesms/contacts/ContactsDatabase.java @@ -141,7 +141,7 @@ public class ContactsDatabase { baseUri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI; } Cursor cursor = context.getContentResolver().query(baseUri, ANDROID_PROJECTION, null, null, CONTACT_LIST_SORT); - return new TypedCursorWrapper(cursor); + return cursor == null ? null : new TypedCursorWrapper(cursor); } private Cursor queryLocalDb(String filter) {