Prevent crash

This commit is contained in:
M66B
2018-12-24 10:51:32 +00:00
parent 9770fe009a
commit 84d09a381c
5 changed files with 5 additions and 5 deletions

View File

@@ -705,7 +705,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
ContactsContract.Contacts.STARRED + " DESC" +
", " + ContactsContract.Contacts.TIMES_CONTACTED + " DESC" +
", " + ContactsContract.Contacts.LAST_TIME_CONTACTED + " DESC");
while (cursor.moveToNext())
while (cursor != null && cursor.moveToNext())
try {
long id = cursor.getLong(cursor.getColumnIndex(ContactsContract.RawContacts._ID));
String name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));