Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f77ffb0 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 25503 into eclair

* changes:
  Don't crash if the cursor is null.
parents f7c98e8d 8d570b3a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -533,7 +533,7 @@ public class Contacts {
            Uri photoUri = Uri.withAppendedPath(person, Contacts.Photos.CONTENT_DIRECTORY);
            Uri photoUri = Uri.withAppendedPath(person, Contacts.Photos.CONTENT_DIRECTORY);
            Cursor cursor = cr.query(photoUri, new String[]{Photos.DATA}, null, null, null);
            Cursor cursor = cr.query(photoUri, new String[]{Photos.DATA}, null, null, null);
            try {
            try {
                if (!cursor.moveToNext()) {
                if (cursor == null || !cursor.moveToNext()) {
                    return null;
                    return null;
                }
                }
                byte[] data = cursor.getBlob(0);
                byte[] data = cursor.getBlob(0);