Fix potential NPE

This commit is contained in:
Dominik Schürmann
2015-11-23 09:19:19 +01:00
parent c5bcbce28f
commit 69bb27a25c

View File

@@ -180,7 +180,7 @@ public class ContactHelper {
ContactsContract.Contacts.Data.IS_PRIMARY + " DESC" ContactsContract.Contacts.Data.IS_PRIMARY + " DESC"
); );
if (profileCursor == null) { if (profileCursor == null) {
return null; return new HashSet<>();
} }
Set<String> emails = new HashSet<>(); Set<String> emails = new HashSet<>();
@@ -210,7 +210,7 @@ public class ContactHelper {
}, },
null, null, null); null, null, null);
if (profileCursor == null) { if (profileCursor == null) {
return null; return new ArrayList<>();
} }
Set<String> names = new HashSet<>(); Set<String> names = new HashSet<>();