fixed npe

This commit is contained in:
Daniel Gultsch 2014-04-08 10:23:05 +02:00
parent 78bd6c423f
commit 92dcf85701
1 changed files with 5 additions and 3 deletions

View File

@ -1289,9 +1289,11 @@ public class XmppConnectionService extends Service {
public Contact findContact(String uuid) { public Contact findContact(String uuid) {
Contact contact = this.databaseBackend.getContact(uuid); Contact contact = this.databaseBackend.getContact(uuid);
for (Account account : getAccounts()) { if (contact!=null) {
if (contact.getAccountUuid().equals(account.getUuid())) { for (Account account : getAccounts()) {
contact.setAccount(account); if (contact.getAccountUuid().equals(account.getUuid())) {
contact.setAccount(account);
}
} }
} }
return contact; return contact;