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

Commit a51f8e97 authored by Daniel Lehmann's avatar Daniel Lehmann
Browse files

Fix a Cursor leak if cursor doesn't have any content

Change-Id: If542cd383678aced6904f52422ac9099d18c050e
parent 2ae2eee7
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2687,9 +2687,12 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC
                new String[] {Phone._ID, Phone.NUMBER, Phone.IS_SUPER_PRIMARY,
                        RawContacts.ACCOUNT_TYPE, Phone.TYPE, Phone.LABEL},
                Data.MIMETYPE + "=?", new String[] {Phone.CONTENT_ITEM_TYPE}, null);
        if (c != null && c.moveToFirst()) {
        if (c != null) {
            if (c.moveToFirst()) {
                return c;
            }
            c.close();
        }
        return null;
    }