From 92dcf857014bfec919d62a7c0457093bd9056d94 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 8 Apr 2014 10:23:05 +0200 Subject: fixed npe --- src/eu/siacs/conversations/services/XmppConnectionService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/eu/siacs/conversations/services') diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 46da0b67..e601d9b9 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -1289,9 +1289,11 @@ public class XmppConnectionService extends Service { public Contact findContact(String uuid) { Contact contact = this.databaseBackend.getContact(uuid); - for (Account account : getAccounts()) { - if (contact.getAccountUuid().equals(account.getUuid())) { - contact.setAccount(account); + if (contact!=null) { + for (Account account : getAccounts()) { + if (contact.getAccountUuid().equals(account.getUuid())) { + contact.setAccount(account); + } } } return contact; -- cgit v1.2.3