mirror of
https://github.com/etesync/android
synced 2024-12-23 15:18:14 +00:00
Check for null values in relations (should fix #547)
This commit is contained in:
parent
534953fe4c
commit
654af1eec5
@ -566,10 +566,14 @@ public class LocalAddressBook extends LocalCollection<Contact> {
|
||||
protected void populateRelation(Contact c, ContentValues row) throws RemoteException {
|
||||
String name = row.getAsString(Relation.NAME);
|
||||
|
||||
// don't process empty relations
|
||||
if (StringUtils.isEmpty(name))
|
||||
return;
|
||||
|
||||
// find relation by name or create new one
|
||||
Related related = null;
|
||||
for (Related rel : c.getRelations()) {
|
||||
if (rel.getText().equals(name)) {
|
||||
if (name.equals(rel.getText())) {
|
||||
related = rel;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user