commit | 039a2aabee31d054b4f14a7f2e1cfa5ffd2be93d | [log] [tgz] |
---|---|---|
author | Evan Millar <emillar@google.com> | Tue Sep 22 16:20:39 2009 -0700 |
committer | Evan Millar <emillar@google.com> | Tue Sep 22 16:20:39 2009 -0700 |
tree | 28d7d07290819f1814fb34133d2fa2d0f96dc3d4 | |
parent | d7f0d0686f1fba3e3b9dc9e1d7369fb9dcb4ed53 [diff] |
Check for null cursor Change-Id: I2d59b92684f67103098fd78b3e78727b9319deb5
diff --git a/src/com/android/contacts/ContactsListActivity.java b/src/com/android/contacts/ContactsListActivity.java index 7661f35..27aee19 100644 --- a/src/com/android/contacts/ContactsListActivity.java +++ b/src/com/android/contacts/ContactsListActivity.java
@@ -1571,7 +1571,7 @@ Uri photoUri = Uri.withAppendedPath(contactUri, Contacts.Photo.CONTENT_DIRECTORY); cursor = getContentResolver().query(photoUri, new String[] {Photo.PHOTO}, null, null, null); - if (cursor.moveToFirst()) { + if (cursor != null && cursor.moveToFirst()) { bm = ContactsUtils.loadContactPhoto(cursor, 0, options); } } finally {